improve code with clippy

This commit is contained in:
2023-11-02 22:19:13 +01:00
parent 1b58641100
commit 9331b2001d
2 changed files with 6 additions and 8 deletions

View File

@ -124,7 +124,7 @@ pub enum LogbookCreateError {
impl From<LogbookUpdateError> for LogbookCreateError {
fn from(value: LogbookUpdateError) -> Self {
return match value {
match value {
LogbookUpdateError::NotYourEntry => LogbookCreateError::NotYourEntry,
LogbookUpdateError::TooManyRowers(a, b) => LogbookCreateError::TooManyRowers(a, b),
LogbookUpdateError::RowerCreateError(a, b) => {
@ -140,7 +140,7 @@ impl From<LogbookUpdateError> for LogbookCreateError {
LogbookUpdateError::UserNotAllowedToUseBoat => {
LogbookCreateError::UserNotAllowedToUseBoat
}
};
}
}
}
@ -429,7 +429,7 @@ ORDER BY departure DESC
return Err(LogbookUpdateError::SteeringPersonNotInRowers);
}
if !boat.shipmaster_allowed(&user).await && self.shipmaster != user.id {
if !boat.shipmaster_allowed(user).await && self.shipmaster != user.id {
//second part:
//shipmaster has
//entered a