mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 17:25:15 +02:00
Try again with math-like externals (#4629)
* Try again with math-like externals * clippy 1.59 * clippy 1.59 * clippy 1.59
This commit is contained in:
@ -194,7 +194,7 @@ impl ProcessInfo {
|
||||
pub fn command(&self) -> String {
|
||||
if let Ok(cmd) = &self.curr_proc.cmdline() {
|
||||
if !cmd.is_empty() {
|
||||
cmd.join(" ").replace("\n", " ").replace("\t", " ")
|
||||
cmd.join(" ").replace('\n', " ").replace('\t', " ")
|
||||
} else {
|
||||
self.curr_proc.stat().comm.clone()
|
||||
}
|
||||
|
@ -324,12 +324,12 @@ impl ProcessInfo {
|
||||
pub fn command(&self) -> String {
|
||||
if let Some(path) = &self.curr_path {
|
||||
if !path.cmd.is_empty() {
|
||||
path.cmd.join(" ").replace("\n", " ").replace("\t", " ")
|
||||
path.cmd.join(" ").replace('\n', " ").replace('\t', " ")
|
||||
} else {
|
||||
String::from("")
|
||||
String::new()
|
||||
}
|
||||
} else {
|
||||
String::from("")
|
||||
String::new()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ pub fn collect_proc(interval: Duration, _with_thread: bool) -> Vec<ProcessInfo>
|
||||
name: None,
|
||||
domainname: None,
|
||||
});
|
||||
let groups = groups.unwrap_or_else(Vec::new);
|
||||
let groups = groups.unwrap_or_default();
|
||||
let thread = thread.unwrap_or_default();
|
||||
|
||||
let proc = ProcessInfo {
|
||||
|
Reference in New Issue
Block a user