From 3d542f542710c0af3240a9aeb95d001e512b1ec3 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 15 Dec 2024 20:45:36 +0300 Subject: [PATCH] lib: clippy pedantic --- src/lib.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1b83c121..733c262a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -143,18 +143,18 @@ impl MpvCommand { /// /// # Returns /// A string slice representing the command. - pub fn as_str(&self) -> &str { + #[must_use] pub const fn as_str(&self) -> &str { match self { - MpvCommand::SetProperty => "set_property", - MpvCommand::PlaylistNext => "playlist-next", - MpvCommand::PlaylistPrev => "playlist-prev", - MpvCommand::Seek => "seek", - MpvCommand::Quit => "quit", - MpvCommand::PlaylistMove => "playlist-move", - MpvCommand::PlaylistRemove => "playlist-remove", - MpvCommand::PlaylistClear => "playlist-clear", - MpvCommand::GetProperty => "get_property", - MpvCommand::LoadFile => "loadfile", + Self::SetProperty => "set_property", + Self::PlaylistNext => "playlist-next", + Self::PlaylistPrev => "playlist-prev", + Self::Seek => "seek", + Self::Quit => "quit", + Self::PlaylistMove => "playlist-move", + Self::PlaylistRemove => "playlist-remove", + Self::PlaylistClear => "playlist-clear", + Self::GetProperty => "get_property", + Self::LoadFile => "loadfile", } } }