commands: use new error variants for various commands

This commit is contained in:
2025-12-08 15:54:37 +09:00
parent 1bdc621200
commit c5f6de4fd3
59 changed files with 653 additions and 296 deletions

View File

@@ -17,6 +17,8 @@ pub struct PlChangesRequest {
impl CommandRequest for PlChangesRequest {
const COMMAND: &'static str = "plchanges";
const MIN_ARGS: u32 = 1;
const MAX_ARGS: Option<u32> = Some(2);
fn into_request_enum(self) -> crate::Request {
crate::Request::PlChanges(self.version, self.window)
@@ -52,7 +54,7 @@ impl CommandRequest for PlChangesRequest {
})
.transpose()?;
debug_assert!(parts.next().is_none());
Self::throw_if_too_many_arguments(parts)?;
Ok(PlChangesRequest { version, window })
}