Add fs::MTime
newtype to encourage !=
instead of >
(#20830)
See ["mtime comparison considered harmful"](https://apenwarr.ca/log/20181113) for details of why comparators other than equality/inequality should not be used with mtime. Release Notes: - N/A
This commit is contained in:
parent
477c6e6833
commit
14ea4621ab
15 changed files with 155 additions and 112 deletions
|
@ -345,7 +345,10 @@ impl ExtensionStore {
|
|||
if let (Ok(Some(index_metadata)), Ok(Some(extensions_metadata))) =
|
||||
(index_metadata, extensions_metadata)
|
||||
{
|
||||
if index_metadata.mtime > extensions_metadata.mtime {
|
||||
if index_metadata
|
||||
.mtime
|
||||
.bad_is_greater_than(extensions_metadata.mtime)
|
||||
{
|
||||
extension_index_needs_rebuild = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue