Skip to content

Commit 3e7c6de

Browse files
committed
Auto merge of #6361 - integer32llc:doc-style, r=carols10cents
Small grammar, punctuation, and code style improvements to docs changelog: Made small grammar, punctuation, and code style improvements to docs I recently found some places in rust-lang/rust that had lists without spaces after commas, which led me to look for more places, which led me over here to find: - Some similar lists in code examples that could use spaces after commas to be idiomatic Rust style - Some lists in documentation text that didn't have spaces after commas, needed an Oxford comma (fight me), or were otherwise misformatted - Some other grammar improvements in the area of the other changes These changes should only be in user-facing documentation or output.
2 parents 831aa96 + 445466e commit 3e7c6de

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

clippy_lints/src/len_zero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ declare_clippy_lint! {
6969
}
7070

7171
declare_clippy_lint! {
72-
/// **What it does:** Checks for comparing to an empty slice such as "" or [],`
72+
/// **What it does:** Checks for comparing to an empty slice such as `""` or `[]`,
7373
/// and suggests using `.is_empty()` where applicable.
7474
///
7575
/// **Why is this bad?** Some structures can answer `.is_empty()` much faster

clippy_lints/src/methods/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ declare_clippy_lint! {
13511351
}
13521352

13531353
declare_clippy_lint! {
1354-
/// **What it does:** Checks for usage of `_.map(_).collect::<Result<(),_>()`.
1354+
/// **What it does:** Checks for usage of `_.map(_).collect::<Result<(), _>()`.
13551355
///
13561356
/// **Why is this bad?** Using `try_for_each` instead is more readable and idiomatic.
13571357
///

clippy_lints/src/regex.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::convert::TryFrom;
1111

1212
declare_clippy_lint! {
1313
/// **What it does:** Checks [regex](https://crates.io/crates/regex) creation
14-
/// (with `Regex::new`,`RegexBuilder::new` or `RegexSet::new`) for correct
14+
/// (with `Regex::new`, `RegexBuilder::new`, or `RegexSet::new`) for correct
1515
/// regex syntax.
1616
///
1717
/// **Why is this bad?** This will lead to a runtime panic.
@@ -29,7 +29,7 @@ declare_clippy_lint! {
2929

3030
declare_clippy_lint! {
3131
/// **What it does:** Checks for trivial [regex](https://crates.io/crates/regex)
32-
/// creation (with `Regex::new`, `RegexBuilder::new` or `RegexSet::new`).
32+
/// creation (with `Regex::new`, `RegexBuilder::new`, or `RegexSet::new`).
3333
///
3434
/// **Why is this bad?** Matching the regex can likely be replaced by `==` or
3535
/// `str::starts_with`, `str::ends_with` or `std::contains` or other `str`

clippy_lints/src/unit_return_expecting_ord.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ declare_clippy_lint! {
2424
/// **Example:**
2525
///
2626
/// ```rust
27-
/// let mut twins = vec!((1,1), (2,2));
27+
/// let mut twins = vec!((1, 1), (2, 2));
2828
/// twins.sort_by_key(|x| { x.1; });
2929
/// ```
3030
pub UNIT_RETURN_EXPECTING_ORD,

clippy_lints/src/useless_conversion.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use rustc_session::{declare_tool_lint, impl_lint_pass};
1212
use rustc_span::sym;
1313

1414
declare_clippy_lint! {
15-
/// **What it does:** Checks for `Into`, `TryInto`, `From`, `TryFrom`,`IntoIter` calls
16-
/// that useless converts to the same type as caller.
15+
/// **What it does:** Checks for `Into`, `TryInto`, `From`, `TryFrom`, or `IntoIter` calls
16+
/// which uselessly convert to the same type.
1717
///
1818
/// **Why is this bad?** Redundant code.
1919
///
@@ -31,7 +31,7 @@ declare_clippy_lint! {
3131
/// ```
3232
pub USELESS_CONVERSION,
3333
complexity,
34-
"calls to `Into`, `TryInto`, `From`, `TryFrom`, `IntoIter` that performs useless conversions to the same type"
34+
"calls to `Into`, `TryInto`, `From`, `TryFrom`, or `IntoIter` which perform useless conversions to the same type"
3535
}
3636

3737
#[derive(Default)]

src/lintlist/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2751,7 +2751,7 @@ vec![
27512751
Lint {
27522752
name: "useless_conversion",
27532753
group: "complexity",
2754-
desc: "calls to `Into`, `TryInto`, `From`, `TryFrom`, `IntoIter` that performs useless conversions to the same type",
2754+
desc: "calls to `Into`, `TryInto`, `From`, `TryFrom`, or `IntoIter` which perform useless conversions to the same type",
27552755
deprecation: None,
27562756
module: "useless_conversion",
27572757
},

0 commit comments

Comments
 (0)