Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit 88527e6

Browse files
committed
Formatting and a typo fix
1 parent 379fabd commit 88527e6

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

cargo-fix/tests/all/smoke.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ fn preserve_line_endings() {
105105
)
106106
.build();
107107

108-
p.expect_cmd("cargo-fix fix")
109-
.fix_everything()
110-
.run();
108+
p.expect_cmd("cargo-fix fix").fix_everything().run();
111109
assert!(p.read("src/lib.rs").contains("\r\n"));
112110
}
113111

@@ -123,9 +121,7 @@ fn fix_deny_warnings() {
123121
)
124122
.build();
125123

126-
p.expect_cmd("cargo-fix fix")
127-
.fix_everything()
128-
.run();
124+
p.expect_cmd("cargo-fix fix").fix_everything().run();
129125
}
130126

131127
#[test]
@@ -146,9 +142,7 @@ fn fix_deny_warnings_but_not_others() {
146142
)
147143
.build();
148144

149-
p.expect_cmd("cargo-fix fix")
150-
.fix_everything()
151-
.run();
145+
p.expect_cmd("cargo-fix fix").fix_everything().run();
152146
assert!(!p.read("src/lib.rs").contains("let mut x = 3;"));
153147
assert!(p.read("src/lib.rs").contains("fn bar() {}"));
154148
}

src/replace.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ enum State {
1414

1515
impl State {
1616
fn is_inserted(&self) -> bool {
17-
if let &State::Inserted(..) = self {
17+
if let State::Inserted(..) = *self {
1818
true
1919
} else {
2020
false
@@ -26,7 +26,7 @@ impl State {
2626
struct Span {
2727
/// Start of this span in parent data
2828
start: usize,
29-
/// up to end inculding
29+
/// up to end including
3030
end: usize,
3131
data: State,
3232
}

0 commit comments

Comments
 (0)