mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 20:42:10 +00:00
Adapt BoolLike to flags (#3175)
This commit is contained in:
parent
6e54cd8233
commit
c8c575dd43
5 changed files with 6 additions and 27 deletions
|
@ -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) =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue