File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -666,15 +666,12 @@ impl fmt::Display for SourceId {
666
666
}
667
667
668
668
/// The hash of SourceId is used in the name of some Cargo folders, so shouldn't
669
- /// vary. `as_str` gives the serialisation of a url (which has a spec) and so
669
+ /// vary. [`CanonicalUrl`] uses `as_str`, the serialisation of a url (which has a spec), and so
670
670
/// insulates against possible changes in how the url crate does hashing.
671
671
impl Hash for SourceId {
672
672
fn hash < S : hash:: Hasher > ( & self , into : & mut S ) {
673
673
self . inner . kind . hash ( into) ;
674
- match self . inner . kind {
675
- SourceKind :: Git ( _) => self . inner . canonical_url . hash ( into) ,
676
- _ => self . inner . url . as_str ( ) . hash ( into) ,
677
- }
674
+ self . inner . canonical_url . hash ( into) ;
678
675
}
679
676
}
680
677
You can’t perform that action at this time.
0 commit comments