Skip to content

Commit 9589831

Browse files
authored
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.
2 parents fdaccd4 + d954a43 commit 9589831

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cargo/sources/git/known_hosts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ enum KnownHostError {
100100

101101
impl From<anyhow::Error> for KnownHostError {
102102
fn from(err: anyhow::Error) -> KnownHostError {
103-
KnownHostError::CheckError(err.into())
103+
KnownHostError::CheckError(err)
104104
}
105105
}
106106

src/cargo/sources/git/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ fn fetch_with_gitoxide(
11871187
);
11881188
let outcome = connection
11891189
.prepare_fetch(&mut progress, gix::remote::ref_map::Options::default())?
1190-
.with_shallow(shallow.clone().into())
1190+
.with_shallow(shallow.clone())
11911191
.receive(&mut progress, should_interrupt)?;
11921192
Ok(outcome)
11931193
});

0 commit comments

Comments
 (0)