Skip to content

Commit 6892b16

Browse files
committed
Auto merge of rust-lang#13865 - lnicola:nits2, r=Veykril
minor: Tweak Clippy policy wording and drop a useless `format!`
2 parents 3033c3d + d96c489 commit 6892b16

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/ide-completion/src/render/variant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub(crate) fn render_tuple_lit(
4949
path: &str,
5050
) -> RenderedLiteral {
5151
if snippet_cap.is_none() {
52-
return RenderedLiteral { literal: format!("{path}"), detail: format!("{path}") };
52+
return RenderedLiteral { literal: path.to_string(), detail: path.to_string() };
5353
}
5454
let completions = fields.iter().enumerate().format_with(", ", |(idx, _), f| {
5555
if snippet_cap.is_some() {

docs/dev/style.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Including a description and GIF suitable for the changelog means less work for t
101101

102102
We don't enforce Clippy.
103103
A number of default lints have high false positive rate.
104-
Selectively patching false-positives with `allow(clippy)` is considered worse than not using Clippy at all.
104+
Selectively patching false-positives with `allow(clippy)` is probably worse than entirely disabling a problematic lint.
105105
There's a `cargo lint` command which runs a subset of low-FPR lints.
106106
Careful tweaking of `lint` is welcome.
107107
Of course, applying Clippy suggestions is welcome as long as they indeed improve the code.

0 commit comments

Comments
 (0)