Remove unnecessary into conversions (#15042)

"identity" `.into()` calls where the base's type isn't changed is a
future compatibility foot-gun (like the issue we had with `time` a few
months ago) as new `impl Into` blocks can cause previously compiling
code to start failing. I don't foresee these ones in particular causing
problems anytime soon, but I noticed them and might as well clean them
up as a drive-by.
This commit is contained in:
Weihang Lo 2025-01-09 19:58:12 +00:00 committed by GitHub
commit 9589831f61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ enum KnownHostError {
impl From<anyhow::Error> for KnownHostError {
fn from(err: anyhow::Error) -> KnownHostError {
KnownHostError::CheckError(err.into())
KnownHostError::CheckError(err)
}
}

View File

@ -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)
});