mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
Replace starts_with and slice with trim_left_matches
This commit is contained in:
parent
34eceae2ef
commit
6fe687c84b
1 changed files with 1 additions and 5 deletions
|
@ -332,11 +332,7 @@ pub fn signal_by_name_or_value(signal_name_or_value: &str) -> Option<usize> {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let signal_name = if signal_name_or_value.starts_with("SIG") {
|
let signal_name = signal_name_or_value.trim_left_matches("SIG");
|
||||||
&signal_name_or_value[3..]
|
|
||||||
} else {
|
|
||||||
&signal_name_or_value[..]
|
|
||||||
};
|
|
||||||
|
|
||||||
ALL_SIGNALS
|
ALL_SIGNALS
|
||||||
.iter()
|
.iter()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue