diff --git a/Cargo.toml b/Cargo.toml index 76618114a9..db549efe17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ resolver = "2" [workspace.package] # Please update rustfmt.toml when bumping the Rust edition edition = "2024" -rust-version = "1.87" +rust-version = "1.88" homepage = "https://docs.astral.sh/ruff" documentation = "https://docs.astral.sh/ruff" repository = "https://github.com/astral-sh/ruff" diff --git a/crates/ruff_db/src/diagnostic/render/full.rs b/crates/ruff_db/src/diagnostic/render/full.rs index 272ad6ee5a..c6a5bc13fa 100644 --- a/crates/ruff_db/src/diagnostic/render/full.rs +++ b/crates/ruff_db/src/diagnostic/render/full.rs @@ -58,10 +58,11 @@ impl<'a> FullRenderer<'a> { writeln!(f, "{}", renderer.render(diag.to_annotate()))?; } - if self.config.show_fix_diff && diag.has_applicable_fix(self.config) { - if let Some(diff) = Diff::from_diagnostic(diag, &stylesheet, self.resolver) { - write!(f, "{diff}")?; - } + if self.config.show_fix_diff + && diag.has_applicable_fix(self.config) + && let Some(diff) = Diff::from_diagnostic(diag, &stylesheet, self.resolver) + { + write!(f, "{diff}")?; } writeln!(f)?;