Skip to content

Commit

Permalink
Fixed incorrect formatting according to cargo fmt --all
Browse files Browse the repository at this point in the history
  • Loading branch information
Mervin committed Jun 4, 2024
1 parent e47fa3b commit 4760379
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 2 additions & 4 deletions server/chroma/src/routes/v1/photo/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,14 @@ pub async fn get(
.photo_to_proto_url(&data.storage, query.quality_preference.clone().into())
.await
{
Ok(p) => {
Ok(Payload(GetPhotoResponse { photo: Some(p) }))
}
Ok(p) => Ok(Payload(GetPhotoResponse { photo: Some(p) })),
Err(e) => match e {
DalError::Storage(e) => match e {
_ => Err(e.into()),
},
DalError::Db(e) => Err(e.into()),
},
}
};
}

let mut proto = photo
Expand Down
8 changes: 2 additions & 6 deletions server/dal/src/database/photo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ impl<'a> Photo<'a> {
PhotoQuality::Original
};

let url = storage
.get_photo_url_by_id( &self.id, quality)
.await?;
let url = storage.get_photo_url_by_id(&self.id, quality).await?;

Ok(proto::Photo {
id: self.id,
Expand Down Expand Up @@ -80,9 +78,7 @@ impl<'a> Photo<'a> {
PhotoQuality::Original
};

let photo_bytes = storage
.get_photo_bytes_by_id(&self.id, quality)
.await?;
let photo_bytes = storage.get_photo_bytes_by_id(&self.id, quality).await?;
Ok(proto::Photo {
id: self.id,
album_id: self.album_id,
Expand Down

0 comments on commit 4760379

Please sign in to comment.