From c1717bf8665ec62e293a2196e0dbaa5904a520f0 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 23 Jun 2025 09:07:00 +0200 Subject: clippy: Remove unnecessary lambda --- server/src/git_root.rs | 8 ++++---- 1 file 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) }); } } -- cgit v1.2.3-70-g09d2