Skip to content

Commit

Permalink
Auto merge of #9615 - danieleades:refactor/simplify-block, r=joshtrip…
Browse files Browse the repository at this point in the history
…lett

simply 'if' block
  • Loading branch information
bors committed Jun 23, 2021
2 parents e5917a2 + c6e5b6c commit a5e7a1d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/cargo/core/dependency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,9 @@ impl Dependency {
}

pub fn map_source(mut self, to_replace: SourceId, replace_with: SourceId) -> Dependency {
if self.source_id() != to_replace {
self
} else {
if self.source_id() == to_replace {
self.set_source_id(replace_with);
self
}
self
}
}

0 comments on commit a5e7a1d

Please sign in to comment.