Rust edition 2024
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::commands::{
|
||||
expect_property_type, Command, Request, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
expect_property_type,
|
||||
};
|
||||
|
||||
pub struct Channels;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::commands::{
|
||||
expect_property_type, Command, Request, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
expect_property_type,
|
||||
};
|
||||
|
||||
pub struct ReadMessages;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
Request,
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
};
|
||||
|
||||
pub struct Protocol;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
Request,
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
};
|
||||
|
||||
pub struct ProtocolAll;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
Request,
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
};
|
||||
|
||||
pub struct ProtocolAvailable;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
Request,
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
};
|
||||
|
||||
pub struct ProtocolClear;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct ProtocolDisable;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct ProtocolEnable;
|
||||
|
||||
@@ -30,7 +30,7 @@ impl Command for TagTypes {
|
||||
GenericResponseValue::Binary(_) => {
|
||||
return Err(ResponseParserError::UnexpectedPropertyType(
|
||||
"tagtype", "Binary",
|
||||
))
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
Request,
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
};
|
||||
|
||||
pub struct TagTypesAll;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
Request,
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
};
|
||||
|
||||
pub struct TagTypesAvailable;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
Request,
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
};
|
||||
|
||||
pub struct TagTypesClear;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct TagTypesDisable;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct TagTypesEnable;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct TagTypesReset;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
Request,
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
};
|
||||
|
||||
pub struct ListMounts;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
Request,
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
};
|
||||
|
||||
pub struct ListNeighbors;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct Mount;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct Unmount;
|
||||
|
||||
@@ -2,8 +2,8 @@ use std::collections::HashMap;
|
||||
|
||||
use crate::{
|
||||
commands::{
|
||||
get_and_parse_property, get_property, Command, Request, RequestParserError,
|
||||
RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError, get_and_parse_property, get_property,
|
||||
},
|
||||
common::Offset,
|
||||
};
|
||||
|
||||
@@ -2,8 +2,8 @@ use std::collections::HashMap;
|
||||
|
||||
use crate::{
|
||||
commands::{
|
||||
get_and_parse_property, Command, Request, RequestParserError, RequestParserResult,
|
||||
ResponseAttributes, ResponseParserError,
|
||||
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError, get_and_parse_property,
|
||||
},
|
||||
filter::parse_filter,
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::commands::{
|
||||
get_and_parse_property, Command, Request, RequestParserError, RequestParserResult,
|
||||
ResponseAttributes, ResponseParserError,
|
||||
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError, get_and_parse_property,
|
||||
};
|
||||
|
||||
pub struct GetFingerprint;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
commands::{
|
||||
expect_property_type, Command, Request, RequestParserError, RequestParserResult,
|
||||
ResponseAttributes, ResponseParserError,
|
||||
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError, expect_property_type,
|
||||
},
|
||||
filter::parse_filter,
|
||||
};
|
||||
|
||||
@@ -2,8 +2,8 @@ use std::collections::HashMap;
|
||||
|
||||
use crate::{
|
||||
commands::{
|
||||
get_and_parse_property, get_optional_property, get_property, Command, Request,
|
||||
RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError, get_and_parse_property, get_optional_property, get_property,
|
||||
},
|
||||
common::Offset,
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::commands::{
|
||||
get_and_parse_property, Command, Request, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
get_and_parse_property,
|
||||
};
|
||||
|
||||
pub struct Rescan;
|
||||
|
||||
@@ -2,8 +2,8 @@ use std::collections::HashMap;
|
||||
|
||||
use crate::{
|
||||
commands::{
|
||||
get_and_parse_property, Command, Request, RequestParserError, RequestParserResult,
|
||||
ResponseAttributes, ResponseParserError,
|
||||
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError, get_and_parse_property,
|
||||
},
|
||||
filter::parse_filter,
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::commands::{
|
||||
get_and_parse_property, Command, Request, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
get_and_parse_property,
|
||||
};
|
||||
|
||||
pub struct Update;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::commands::{
|
||||
expect_property_type, Command, Request, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
expect_property_type,
|
||||
};
|
||||
|
||||
pub struct ListPartitions;
|
||||
|
||||
@@ -2,8 +2,8 @@ use std::collections::HashMap;
|
||||
|
||||
use crate::{
|
||||
commands::{
|
||||
get_and_parse_property, Command, Request, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
get_and_parse_property,
|
||||
},
|
||||
common::VolumeValue,
|
||||
};
|
||||
|
||||
@@ -4,8 +4,8 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
commands::{
|
||||
get_property, Command, Request, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
get_property,
|
||||
},
|
||||
common::ReplayGainModeMode,
|
||||
};
|
||||
|
||||
@@ -3,8 +3,8 @@ use std::collections::HashMap;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::commands::{
|
||||
get_and_parse_optional_property, get_and_parse_property, Command, Request, RequestParserResult,
|
||||
ResponseAttributes, ResponseParserError,
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
get_and_parse_optional_property, get_and_parse_property,
|
||||
};
|
||||
|
||||
pub struct Stats;
|
||||
|
||||
@@ -6,9 +6,9 @@ use serde::{Deserialize, Serialize};
|
||||
use crate::common::{Audio, BoolOrOneshot, SongId, SongPosition};
|
||||
|
||||
use crate::commands::{
|
||||
get_and_parse_optional_property, get_and_parse_property, get_optional_property, get_property,
|
||||
Command, GenericResponseValue, Request, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
ResponseParserError, get_and_parse_optional_property, get_and_parse_property,
|
||||
get_optional_property, get_property,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
commands::{
|
||||
get_next_and_parse_property, Command, Request, RequestParserError, RequestParserResult,
|
||||
ResponseAttributes, ResponseParserError,
|
||||
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError, get_next_and_parse_property,
|
||||
},
|
||||
common::{SongId, SongPosition},
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct AddTagId;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct ClearTagId;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use std::str::FromStr;
|
||||
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
common::OneOrRange,
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct Delete;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct DeleteId;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct Move;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct MoveId;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
Request,
|
||||
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
||||
};
|
||||
|
||||
pub struct Playlist;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
filter::parse_filter,
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct PlaylistFind;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct PlaylistId;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct PlaylistInfo;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
filter::parse_filter,
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct PlaylistSearch;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct PlChanges;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct PlChangesPosId;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct Prio;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct PrioId;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct RangeId;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct Shuffle;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct Swap;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
Request,
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct SwapId;
|
||||
|
||||
@@ -30,7 +30,7 @@ impl Command for Commands {
|
||||
GenericResponseValue::Binary(_) => {
|
||||
return Err(ResponseParserError::UnexpectedPropertyType(
|
||||
"handler", "Binary",
|
||||
))
|
||||
));
|
||||
}
|
||||
};
|
||||
result.push(value.to_string());
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::commands::{
|
||||
get_and_parse_property, get_property, Command, Request, RequestParserResult,
|
||||
ResponseAttributes, ResponseParserError,
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
get_and_parse_property, get_property,
|
||||
};
|
||||
|
||||
pub struct Config;
|
||||
|
||||
@@ -30,7 +30,7 @@ impl Command for NotCommands {
|
||||
GenericResponseValue::Binary(_) => {
|
||||
return Err(ResponseParserError::UnexpectedPropertyType(
|
||||
"handler", "Binary",
|
||||
))
|
||||
));
|
||||
}
|
||||
};
|
||||
result.push(value.to_string());
|
||||
|
||||
@@ -30,7 +30,7 @@ impl Command for UrlHandlers {
|
||||
GenericResponseValue::Binary(_) => {
|
||||
return Err(ResponseParserError::UnexpectedPropertyType(
|
||||
"handler", "Binary",
|
||||
))
|
||||
));
|
||||
}
|
||||
};
|
||||
url_handlers.push(value.to_string());
|
||||
|
||||
@@ -87,7 +87,7 @@ impl Command for StickerFind {
|
||||
let uri = match uri.1 {
|
||||
GenericResponseValue::Text(s) => s.to_string(),
|
||||
GenericResponseValue::Binary(_) => {
|
||||
return Err(ResponseParserError::UnexpectedPropertyType(uri.0, "Binary"))
|
||||
return Err(ResponseParserError::UnexpectedPropertyType(uri.0, "Binary"));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -96,7 +96,7 @@ impl Command for StickerFind {
|
||||
GenericResponseValue::Binary(_) => {
|
||||
return Err(ResponseParserError::UnexpectedPropertyType(
|
||||
"sticker", "Binary",
|
||||
))
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::commands::{
|
||||
get_next_property, Command, Request, RequestParserError, RequestParserResult,
|
||||
ResponseAttributes, ResponseParserError,
|
||||
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError, get_next_property,
|
||||
};
|
||||
|
||||
pub struct StickerGet;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::commands::{
|
||||
expect_property_type, Command, Request, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
expect_property_type,
|
||||
};
|
||||
|
||||
pub struct StickerNames;
|
||||
|
||||
@@ -39,7 +39,7 @@ impl Command for StickerNamesTypes {
|
||||
GenericResponseValue::Binary(_) => {
|
||||
return Err(ResponseParserError::UnexpectedPropertyType(
|
||||
"name", "Binary",
|
||||
))
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -48,7 +48,7 @@ impl Command for StickerNamesTypes {
|
||||
GenericResponseValue::Binary(_) => {
|
||||
return Err(ResponseParserError::UnexpectedPropertyType(
|
||||
"type", "Binary",
|
||||
))
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::commands::{
|
||||
expect_property_type, Command, Request, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
expect_property_type,
|
||||
};
|
||||
|
||||
pub struct StickerTypes;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::commands::{
|
||||
get_and_parse_property, Command, Request, RequestParserError, RequestParserResult,
|
||||
ResponseAttributes, ResponseParserError,
|
||||
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError, get_and_parse_property,
|
||||
};
|
||||
|
||||
pub struct PlaylistLength;
|
||||
|
||||
@@ -239,7 +239,7 @@ impl Request {
|
||||
.ok_or(RequestParserError::MissingCommandListEnd(i))?;
|
||||
match line.trim() {
|
||||
"command_list_begin" => {
|
||||
return Err(RequestParserError::NestedCommandList(i))
|
||||
return Err(RequestParserError::NestedCommandList(i));
|
||||
}
|
||||
"command_list_end" => {
|
||||
return Ok((Request::CommandList(commands), rest));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::{common::SubSystem, Request, Response};
|
||||
use crate::{Request, Response, common::SubSystem};
|
||||
|
||||
pub trait MPDServer {
|
||||
type Error;
|
||||
|
||||
Reference in New Issue
Block a user