Skip to content

Commit

Permalink
remove map_err
Browse files Browse the repository at this point in the history
  • Loading branch information
calebbourg committed Dec 5, 2023
1 parent e7b778e commit 3a29849
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions entity_api/src/organization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ pub async fn find_all(db: &DatabaseConnection) -> Vec<Model> {
}

pub async fn find_by_id(db: &DatabaseConnection, id: i32) -> Result<Option<Model>, Error> {
Entity::find_by_id(id)
.one(db)
.await
.map_err(|err| err.into())
Ok(Entity::find_by_id(id).one(db).await?)
}

pub(crate) async fn seed_database(db: &DatabaseConnection) {
Expand Down

0 comments on commit 3a29849

Please sign in to comment.