Skip to content

Commit 208e2fc

Browse files
authored
Merge pull request #1080 from sourcefrog/patch-2
Fix Markdown syntax in description of collapsible_if
2 parents 65d27b4 + 585a3b2 commit 208e2fc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ name
4343
[clone_on_copy](https://github.com/Manishearth/rust-clippy/wiki#clone_on_copy) | warn | using `clone` on a `Copy` type
4444
[cmp_nan](https://github.com/Manishearth/rust-clippy/wiki#cmp_nan) | deny | comparisons to NAN (which will always return false, which is probably not intended)
4545
[cmp_owned](https://github.com/Manishearth/rust-clippy/wiki#cmp_owned) | warn | creating owned instances for comparing with others, e.g. `x == "foo".to_string()`
46-
[collapsible_if](https://github.com/Manishearth/rust-clippy/wiki#collapsible_if) | warn | two nested `if`-expressions can be collapsed into one, e.g. `if x { if y { foo() } }` can be written as `if x && y { foo() }` and an `else { if .. } expression can be collapsed to `else if`
46+
[collapsible_if](https://github.com/Manishearth/rust-clippy/wiki#collapsible_if) | warn | two nested `if`-expressions can be collapsed into one, e.g. `if x { if y { foo() } }` can be written as `if x && y { foo() }` and an `else { if .. }` expression can be collapsed to `else if`
4747
[crosspointer_transmute](https://github.com/Manishearth/rust-clippy/wiki#crosspointer_transmute) | warn | transmutes that have to or from types that are a pointer to the other
4848
[cyclomatic_complexity](https://github.com/Manishearth/rust-clippy/wiki#cyclomatic_complexity) | warn | finds functions that should be split up into multiple functions
4949
[deprecated_semver](https://github.com/Manishearth/rust-clippy/wiki#deprecated_semver) | warn | `Warn` on `#[deprecated(since = "x")]` where x is not semver

clippy_lints/src/collapsible_if.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ declare_lint! {
3232
pub COLLAPSIBLE_IF,
3333
Warn,
3434
"two nested `if`-expressions can be collapsed into one, e.g. `if x { if y { foo() } }` \
35-
can be written as `if x && y { foo() }` and an `else { if .. } expression can be collapsed to \
35+
can be written as `if x && y { foo() }` \
36+
and an `else { if .. }` expression can be collapsed to \
3637
`else if`"
3738
}
3839

0 commit comments

Comments
 (0)