mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
Fix some clippy lints
Some might actually improve perf
This commit is contained in:
1 parent
a4828387c1
commit
e37e9c1214
12 files changed
+30
-33
No files matched your search
+1
-1
@@ -30,7 +30,7 @@ impl LineRange {
|
||||
fn parse_range(range_raw: &str) -> Result<LineRange> {
|
||||
let mut new_range = LineRange::default();
|
||||
|
||||
if range_raw.bytes().nth(0).ok_or("Empty line range")? == b':' {
|
||||
if range_raw.bytes().next().ok_or("Empty line range")? == b':' {
|
||||
new_range.upper = range_raw[1..].parse()?;
|
||||
return Ok(new_range);
|
||||
} else if range_raw.bytes().last().ok_or("Empty line range")? == b':' {
|
||||
|
||||
Reference in new issue
Block a user