diff --git a/src/cargo/sources/git/known_hosts.rs b/src/cargo/sources/git/known_hosts.rs index b832886bc37..02b70c9112b 100644 --- a/src/cargo/sources/git/known_hosts.rs +++ b/src/cargo/sources/git/known_hosts.rs @@ -100,7 +100,7 @@ enum KnownHostError { impl From for KnownHostError { fn from(err: anyhow::Error) -> KnownHostError { - KnownHostError::CheckError(err.into()) + KnownHostError::CheckError(err) } } diff --git a/src/cargo/sources/git/utils.rs b/src/cargo/sources/git/utils.rs index b40988724c9..d9bf0b2f006 100644 --- a/src/cargo/sources/git/utils.rs +++ b/src/cargo/sources/git/utils.rs @@ -1187,7 +1187,7 @@ fn fetch_with_gitoxide( ); let outcome = connection .prepare_fetch(&mut progress, gix::remote::ref_map::Options::default())? - .with_shallow(shallow.clone().into()) + .with_shallow(shallow.clone()) .receive(&mut progress, should_interrupt)?; Ok(outcome) });