From 619fbccde018a274b74f740613a995a45f47ef23 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 8 Dec 2025 00:52:27 +0900 Subject: [PATCH] commands: fix request enum conversion for `unmount` --- src/commands/mounts_and_neighbors/unmount.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/commands/mounts_and_neighbors/unmount.rs b/src/commands/mounts_and_neighbors/unmount.rs index aff3a01..af1fc12 100644 --- a/src/commands/mounts_and_neighbors/unmount.rs +++ b/src/commands/mounts_and_neighbors/unmount.rs @@ -14,15 +14,12 @@ impl CommandRequest<'_> for UnmountRequest { const COMMAND: &'static str = "unmount"; fn into_request_enum(self) -> crate::Request { - match Self::COMMAND { - "unmount" => crate::Request::Unmount(self.0), - _ => unimplemented!(), - } + crate::Request::Unmount(self.0) } fn from_request_enum(request: crate::Request) -> Option { - match (Self::COMMAND, request) { - ("unmount", crate::Request::Unmount(item)) => Some(UnmountRequest(item)), + match request { + crate::Request::Unmount(item) => Some(UnmountRequest(item)), _ => None, } }