diff --git a/src/api2/node.rs b/src/api2/node.rs index 78e0fa44..fc32193b 100644 --- a/src/api2/node.rs +++ b/src/api2/node.rs @@ -121,7 +121,7 @@ async fn termproxy( )?; let mut command = Vec::new(); - match cmd.as_ref().map(|x| x.as_str()) { + match cmd.as_deref() { Some("login") | None => { command.push("login"); if userid == "root@pam" { diff --git a/src/tools/disks.rs b/src/tools/disks.rs index e3b93e02..bfea5a8b 100644 --- a/src/tools/disks.rs +++ b/src/tools/disks.rs @@ -105,7 +105,7 @@ impl DiskManage { let mut mounted = HashSet::new(); for (_id, mp) in self.mount_info()? { - let source = match mp.mount_source.as_ref().map(OsString::as_os_str) { + let source = match mp.mount_source.as_deref() { Some(s) => s, None => continue, };