Skip to content

Commit de5c34b

Browse files
committed
Resolve get_first clippy lint
error: accessing first element with `slice.as_bytes().get(0)` --> src/error.rs:441:11 | 441 | match slice.as_bytes().get(0) { | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `slice.as_bytes().first()` | = note: `-D clippy::get-first` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
1 parent 6b91c96 commit de5c34b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ fn parse_line_col(msg: &mut String) -> Option<(usize, usize)> {
438438
}
439439

440440
fn starts_with_digit(slice: &str) -> bool {
441-
match slice.as_bytes().get(0) {
441+
match slice.as_bytes().first() {
442442
None => false,
443443
Some(&byte) => byte >= b'0' && byte <= b'9',
444444
}

0 commit comments

Comments
 (0)