mirror of
https://github.com/uutils/sed.git
synced 2026-06-10 16:14:15 -07:00
clippy: fix warnings from collapsible_match lint
This commit is contained in:
+4
-12
@@ -122,19 +122,11 @@ fn applies(
|
||||
// See if latch must start.
|
||||
if match_address(addr1, reader, pattern, context, &command.location)? {
|
||||
match addr2 {
|
||||
Address::Line(n) => {
|
||||
if linenum >= *n {
|
||||
context.last_address = true;
|
||||
} else {
|
||||
command.start_line = Some(linenum);
|
||||
}
|
||||
Address::Line(n) if linenum >= *n => {
|
||||
context.last_address = true;
|
||||
}
|
||||
Address::RelLine(n) => {
|
||||
if *n == 0 {
|
||||
context.last_address = true;
|
||||
} else {
|
||||
command.start_line = Some(linenum);
|
||||
}
|
||||
Address::RelLine(n) if *n == 0 => {
|
||||
context.last_address = true;
|
||||
}
|
||||
_ => {
|
||||
command.start_line = Some(linenum);
|
||||
|
||||
Reference in New Issue
Block a user