clean code with clippy
This commit is contained in:
@ -118,7 +118,7 @@ pub enum LogbookCreateError {
|
||||
BoatLocked,
|
||||
BoatNotFound,
|
||||
TooManyRowers(usize, usize),
|
||||
RowerAlreadyOnWater(User),
|
||||
RowerAlreadyOnWater(Box<User>),
|
||||
RowerCreateError(i64, String),
|
||||
ArrivalNotAfterDeparture,
|
||||
SteeringPersonNotInRowers,
|
||||
@ -386,7 +386,7 @@ ORDER BY departure DESC
|
||||
let user = User::find_by_id(db, *rower as i32).await.unwrap();
|
||||
|
||||
if user.on_water(db).await {
|
||||
return Err(LogbookCreateError::RowerAlreadyOnWater(user));
|
||||
return Err(LogbookCreateError::RowerAlreadyOnWater(Box::new(user)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user