cargo fmt
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -41,8 +41,6 @@ impl Command for ListAll {
|
||||
fn parse_response(
|
||||
parts: ResponseAttributes<'_>,
|
||||
) -> Result<Self::Response, ResponseParserError<'_>> {
|
||||
|
||||
|
||||
DbSelectionPrintResponse::parse(parts)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,8 +40,6 @@ impl Command for ListAllInfo {
|
||||
fn parse_response(
|
||||
parts: ResponseAttributes<'_>,
|
||||
) -> Result<Self::Response, ResponseParserError<'_>> {
|
||||
|
||||
|
||||
DbSelectionPrintResponse::parse(parts)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)?
|
||||
|
||||
@@ -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().
|
||||
|
||||
@@ -44,7 +44,7 @@ impl Command for PlaylistDelete {
|
||||
debug_assert!(parts.next().is_none());
|
||||
|
||||
Ok(PlaylistDeleteRequest {
|
||||
playlist_name: playlist_name,
|
||||
playlist_name,
|
||||
position,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user