Skip to content

Commit 46872ff

Browse files
committed
fix test
1 parent cbe2c17 commit 46872ff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/ui/truncate_with_drain.fixed

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ fn string_range_from() {
201201

202202
// Do lint
203203
let x = 1;
204-
let mut v = String::from("Hello, world!");
205-
v.truncate(x);
204+
let mut s = String::from("Hello, world!");
205+
s.truncate(x);
206206
}
207207

208208
fn string_partial_drains() {

tests/ui/truncate_with_drain.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ LL | s.drain(1..);
6464
error: `drain` used to truncate a `String`
6565
--> tests/ui/truncate_with_drain.rs:205:7
6666
|
67-
LL | v.drain(x..);
67+
LL | s.drain(x..);
6868
| ^^^^^^^^^^ help: try: `truncate(x)`
6969

7070
error: aborting due to 11 previous errors

0 commit comments

Comments
 (0)