forked from Ruderverein-Donau-Linz/rowt
		
	no more clones!
This commit is contained in:
		@@ -79,10 +79,10 @@ WHERE day=?",
 | 
			
		||||
                trip_type = TripType::find_by_id(db, trip_type_id).await;
 | 
			
		||||
            }
 | 
			
		||||
            ret.push(PlannedEventWithUserAndTriptype {
 | 
			
		||||
                planned_event: event.clone(),
 | 
			
		||||
                cox_needed: event.planned_amount_cox > cox.len() as i64,
 | 
			
		||||
                cox,
 | 
			
		||||
                rower: event.get_all_rower(db).await,
 | 
			
		||||
                planned_event: event,
 | 
			
		||||
                trip_type,
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -113,9 +113,9 @@ ORDER BY name
 | 
			
		||||
                                                                //been deleted
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        match user.pw.clone() {
 | 
			
		||||
        match user.pw.as_ref() {
 | 
			
		||||
            Some(user_pw) => {
 | 
			
		||||
                let password_hash = Self::get_hashed_pw(&pw);
 | 
			
		||||
                let password_hash = &Self::get_hashed_pw(&pw);
 | 
			
		||||
                if password_hash == user_pw {
 | 
			
		||||
                    return Ok(user);
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
@@ -98,7 +98,6 @@ async fn create(
 | 
			
		||||
    _admin: AdminUser,
 | 
			
		||||
) -> Flash<Redirect> {
 | 
			
		||||
    if User::create(db, data.name, data.is_guest).await {
 | 
			
		||||
        //TODO: fix clone() above
 | 
			
		||||
        Flash::success(Redirect::to("/admin/user"), "Successfully created user")
 | 
			
		||||
    } else {
 | 
			
		||||
        Flash::error(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user