Skip to content

Commit

Permalink
backwards ends_with
Browse files Browse the repository at this point in the history
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
  • Loading branch information
Eh2406 and weihanglo committed Apr 4, 2022
1 parent affd456 commit 269033d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cargo/sources/registry/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl<'cfg> RegistryData for RemoteRegistry<'cfg> {
// Check if the cache is valid.
let current_version = self.current_version();
if let (Some(c), Some(i)) = (current_version, index_version) {
if c.ends_with(i) {
if i.ends_with(c.as_str()) {
return Poll::Ready(Ok(LoadResponse::CacheValid));
}
}
Expand Down

0 comments on commit 269033d

Please sign in to comment.