From 0e2262882bc21118c268507209e857438ae94069 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Sat, 20 Aug 2022 11:52:13 +0200 Subject: [PATCH] fix some clippy workarounds --- asyncgit/src/sync/commits_info.rs | 2 -- asyncgit/src/sync/cred.rs | 14 -------------- src/components/mod.rs | 3 --- 3 files changed, 19 deletions(-) diff --git a/asyncgit/src/sync/commits_info.rs b/asyncgit/src/sync/commits_info.rs index 8f9e726a..52e715b0 100644 --- a/asyncgit/src/sync/commits_info.rs +++ b/asyncgit/src/sync/commits_info.rs @@ -27,8 +27,6 @@ impl CommitId { } } -//TODO: remove once clippy fixed: https://github.com/rust-lang/rust-clippy/issues/6983 -#[allow(clippy::wrong_self_convention)] impl ToString for CommitId { fn to_string(&self) -> String { self.0.to_string() diff --git a/asyncgit/src/sync/cred.rs b/asyncgit/src/sync/cred.rs index f17c9941..4e7d7960 100644 --- a/asyncgit/src/sync/cred.rs +++ b/asyncgit/src/sync/cred.rs @@ -171,8 +171,6 @@ mod tests { let repo_path: &RepoPath = &root.as_os_str().to_str().unwrap().into(); - //TODO: - // env::set_current_dir(repo_path).unwrap(); repo.remote(DEFAULT_REMOTE_NAME, "http://user@github.com") .unwrap(); @@ -187,8 +185,6 @@ mod tests { let repo_path: &RepoPath = &root.as_os_str().to_str().unwrap().into(); - //TODO: - // env::set_current_dir(repo_path).unwrap(); repo.remote(DEFAULT_REMOTE_NAME, "git@github.com:user/repo") .unwrap(); @@ -224,9 +220,6 @@ mod tests { let repo_path: &RepoPath = &root.as_os_str().to_str().unwrap().into(); - //TODO: - // env::set_current_dir(repo_path).unwrap(); - need_username_password(repo_path).unwrap(); } @@ -238,8 +231,6 @@ mod tests { let repo_path: &RepoPath = &root.as_os_str().to_str().unwrap().into(); - //TODO: - // env::set_current_dir(repo_path).unwrap(); repo.remote( DEFAULT_REMOTE_NAME, "http://user:pass@github.com", @@ -263,8 +254,6 @@ mod tests { let repo_path: &RepoPath = &root.as_os_str().to_str().unwrap().into(); - //TODO: - // env::set_current_dir(repo_path).unwrap(); repo.remote(DEFAULT_REMOTE_NAME, "http://user@github.com") .unwrap(); @@ -284,9 +273,6 @@ mod tests { let repo_path: &RepoPath = &root.as_os_str().to_str().unwrap().into(); - //TODO: not needed anymore? - // env::set_current_dir(repo_path).unwrap(); - extract_username_password(repo_path).unwrap(); } } diff --git a/src/components/mod.rs b/src/components/mod.rs index ea7d8f28..b2f1f2b3 100644 --- a/src/components/mod.rs +++ b/src/components/mod.rs @@ -245,9 +245,6 @@ impl From for EventState { /// base component trait pub trait Component { /// - //TODO: remove once workaround for clippy bug: - // - #[allow(clippy::ptr_arg)] fn commands( &self, out: &mut Vec,