cargo fmt
Some checks failed
Build and test / check (push) Failing after 58s
Build and test / build (push) Successful in 1m6s
Build and test / docs (push) Successful in 1m10s
Build and test / test (push) Successful in 2m19s

This commit is contained in:
2025-12-07 21:39:57 +09:00
parent 64c94d6e89
commit c1dbdd4644
7 changed files with 15 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
use crate::{Request, request_tokenizer::RequestTokenizer, response_tokenizer::ResponseAttributes};
use crate::{request_tokenizer::RequestTokenizer, response_tokenizer::ResponseAttributes};
mod audio_output_devices;
mod client_to_client;

View File

@@ -41,8 +41,6 @@ impl Command for ListAll {
fn parse_response(
parts: ResponseAttributes<'_>,
) -> Result<Self::Response, ResponseParserError<'_>> {
DbSelectionPrintResponse::parse(parts)
}
}

View File

@@ -40,8 +40,6 @@ impl Command for ListAllInfo {
fn parse_response(
parts: ResponseAttributes<'_>,
) -> Result<Self::Response, ResponseParserError<'_>> {
DbSelectionPrintResponse::parse(parts)
}
}

View File

@@ -41,8 +41,6 @@ impl Command for ListFiles {
fn parse_response(
parts: ResponseAttributes<'_>,
) -> Result<Self::Response, ResponseParserError<'_>> {
// TODO: debug assert only toplevel dirs
DbSelectionPrintResponse::parse(parts)?

View File

@@ -1,4 +1,3 @@
use crate::{
DbSelectionPrintResponse,
commands::{Command, RequestParserError, ResponseParserError},
@@ -40,8 +39,6 @@ impl Command for LsInfo {
fn parse_response(
parts: ResponseAttributes<'_>,
) -> Result<Self::Response, ResponseParserError<'_>> {
// TODO: debug_assert no song variants
// debug_assert!(
// result.iter().

View File

@@ -44,7 +44,7 @@ impl Command for PlaylistDelete {
debug_assert!(parts.next().is_none());
Ok(PlaylistDeleteRequest {
playlist_name: playlist_name,
playlist_name,
position,
})
}

View File

@@ -203,22 +203,21 @@ pub enum Request {
}
impl Request {
// pub enum RequestParserError {
// SyntaxError(u64, String),
// MissingCommandListEnd(u64),
// NestedCommandList(u64),
// UnexpectedCommandListEnd(u64),
// UnexpectedEOF,
// MissingNewline,
// }
// pub enum RequestParserError {
// SyntaxError(u64, String),
// MissingCommandListEnd(u64),
// NestedCommandList(u64),
// UnexpectedCommandListEnd(u64),
// UnexpectedEOF,
// MissingNewline,
// }
// TODO: upon encountering an error, there should be a function that lets you skip to the next OK,
// and continue execution. Maybe "parse_next_or_skip(&str) -> RequestParserResponse", which
// could skip stuff internally? Or do we want to report back the error with the entire command
// and let the library user decide what to do?
// TODO: upon encountering an error, there should be a function that lets you skip to the next OK,
// and continue execution. Maybe "parse_next_or_skip(&str) -> RequestParserResponse", which
// could skip stuff internally? Or do we want to report back the error with the entire command
// and let the library user decide what to do?
// impl Request {
// impl Request {
// pub fn parse_next(raw: &str) -> Result<Self::Request, RequestParserError> {
// let (line, rest) = raw
// .split_once('\n')