Adapt BoolLike to flags (#3175)

This commit is contained in:
Jeong YunWon 2023-02-24 06:31:46 +09:00 committed by GitHub
parent 6e54cd8233
commit c8c575dd43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 27 deletions

View file

@ -65,8 +65,7 @@ pub fn lint_path(
// to cache `fixer::Mode::Apply`, since a file either has no fixes, or we'll
// write the fixes to disk, thus invalidating the cache. But it's a bit hard
// to reason about. We need to come up with a better solution here.)
let metadata = if matches!(cache, flags::Cache::Enabled)
&& matches!(autofix, fix::FixMode::None | fix::FixMode::Generate)
let metadata = if cache.into() && matches!(autofix, fix::FixMode::None | fix::FixMode::Generate)
{
let metadata = path.metadata()?;
if let Some(messages) =