Skip to content

Commit

Permalink
Change TODO clippy to wait for false positive correction (#2110)
Browse files Browse the repository at this point in the history
Closes #2100 

Changes the TODO clippy as it's false positive that will be fixed in the
next Rust releases.
  • Loading branch information
AurelienFT authored Aug 21, 2024
1 parent 000646b commit 52d031f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/chain-config/src/config/snapshot_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub enum TableEncoding {
},
}
impl TableEncoding {
#[allow(clippy::assigning_clones)] // TODO: clean up the following code
#[allow(clippy::assigning_clones)] // False positive will be fixed in 1.81 Rust (https://github.com/rust-lang/rust-clippy/pull/12756)
fn strip_prefix(&mut self, dir: &Path) -> anyhow::Result<()> {
match self {
TableEncoding::Json { filepath } => {
Expand All @@ -41,7 +41,6 @@ impl TableEncoding {
Ok(())
}

#[allow(clippy::needless_borrows_for_generic_args)] // False positive
fn prepend_path(&mut self, dir: &Path) {
match self {
TableEncoding::Json { filepath } => {
Expand Down Expand Up @@ -82,7 +81,7 @@ impl SnapshotMetadata {
Ok(snapshot)
}

#[allow(clippy::assigning_clones)] // TODO: clean up the following code
#[allow(clippy::assigning_clones)] // False positive will be fixed in 1.81 Rust (https://github.com/rust-lang/rust-clippy/pull/12756)
fn strip_prefix(&mut self, dir: &Path) -> anyhow::Result<&mut Self> {
self.chain_config = self.chain_config.strip_prefix(dir)?.to_owned();
self.table_encoding.strip_prefix(dir)?;
Expand Down

0 comments on commit 52d031f

Please sign in to comment.