diff options
| author | bors <bors@rust-lang.org> | 2022-12-30 21:20:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-30 21:20:43 +0000 |
| commit | 6892b16336222c98239ead51158741f82a8a1c32 (patch) | |
| tree | bf0dcc3d53e7df9002bab20a4633676582e0cf26 | |
| parent | 3033c3ddbfcb0e42084ada8931e88d11eb98dee4 (diff) | |
| parent | d96c489120551d36f5bdb362ce313052350821f7 (diff) | |
| download | rust-6892b16336222c98239ead51158741f82a8a1c32.tar.gz rust-6892b16336222c98239ead51158741f82a8a1c32.zip | |
Auto merge of #13865 - lnicola:nits2, r=Veykril
minor: Tweak Clippy policy wording and drop a useless `format!`
| -rw-r--r-- | crates/ide-completion/src/render/variant.rs | 2 | ||||
| -rw-r--r-- | docs/dev/style.md | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide-completion/src/render/variant.rs b/crates/ide-completion/src/render/variant.rs index 5995da68a16..f3e88489f46 100644 --- a/crates/ide-completion/src/render/variant.rs +++ b/crates/ide-completion/src/render/variant.rs @@ -49,7 +49,7 @@ pub(crate) fn render_tuple_lit( path: &str, ) -> RenderedLiteral { if snippet_cap.is_none() { - return RenderedLiteral { literal: format!("{path}"), detail: format!("{path}") }; + return RenderedLiteral { literal: path.to_string(), detail: path.to_string() }; } let completions = fields.iter().enumerate().format_with(", ", |(idx, _), f| { if snippet_cap.is_some() { diff --git a/docs/dev/style.md b/docs/dev/style.md index a80eebd6329..d2a03fba40d 100644 --- a/docs/dev/style.md +++ b/docs/dev/style.md @@ -101,7 +101,7 @@ Including a description and GIF suitable for the changelog means less work for t We don't enforce Clippy. A number of default lints have high false positive rate. -Selectively patching false-positives with `allow(clippy)` is considered worse than not using Clippy at all. +Selectively patching false-positives with `allow(clippy)` is probably worse than entirely disabling a problematic lint. There's a `cargo lint` command which runs a subset of low-FPR lints. Careful tweaking of `lint` is welcome. Of course, applying Clippy suggestions is welcome as long as they indeed improve the code. |
