Skip to content

Commit

Permalink
Remove unnecessary into conversions (#15042)
Browse files Browse the repository at this point in the history
"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.
  • Loading branch information
weihanglo authored Jan 9, 2025
2 parents fdaccd4 + d954a43 commit 9589831
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cargo/sources/git/known_hosts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/cargo/sources/git/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
});
Expand Down

0 comments on commit 9589831

Please sign in to comment.