mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Replace starts_with and slice with trim_left_matches
This commit is contained in:
@@ -332,11 +332,7 @@ pub fn signal_by_name_or_value(signal_name_or_value: &str) -> Option<usize> {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
let signal_name = if signal_name_or_value.starts_with("SIG") {
|
||||
&signal_name_or_value[3..]
|
||||
} else {
|
||||
&signal_name_or_value[..]
|
||||
};
|
||||
let signal_name = signal_name_or_value.trim_left_matches("SIG");
|
||||
|
||||
ALL_SIGNALS
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user