clippy: fix option_as_ref_deref

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2021-01-19 11:10:40 +01:00
parent a6bd669854
commit 1e0c6194b5
2 changed files with 2 additions and 2 deletions

View File

@ -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" {

View File

@ -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,
};