summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/git_root.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/git_root.rs b/server/src/git_root.rs
index f915095..0af7b04 100644
--- a/server/src/git_root.rs
+++ b/server/src/git_root.rs
@@ -103,7 +103,7 @@ impl Roots {
}
}
- repo.fetch(branch).await.map_err(|e| anyhow::Error::new(e))
+ repo.fetch(branch).await.map_err(anyhow::Error::new)
}
pub async fn del_branch(&self, project_id: &str, branch: &str) -> Result<(), git::Error> {
@@ -160,7 +160,7 @@ async fn trans_review_add_strings(
let mut entries = repo
.ls_tree(commit, true)
.await
- .map_err(|e| anyhow::Error::new(e))?;
+ .map_err(anyhow::Error::new)?;
entries.retain(|e| e.object_type == git::ObjectType::BLOB);
let grits = entries
.iter()
@@ -177,8 +177,8 @@ async fn trans_review_add_strings(
return rt.block_on(async move {
repo.cat_file(git::ObjectType::BLOB, object_name)
.await
- .map(|x| BufReader::new(x))
- .map_err(|e| anyhow::Error::new(e))
+ .map(BufReader::new)
+ .map_err(anyhow::Error::new)
});
}
}