flake.lock: bump, Cargo.{toml,lock}: update inputs, fmt, lint
All checks were successful
Build and test / build (push) Successful in 1m12s
Build and test / docs (push) Successful in 1m20s
Build and test / check (push) Successful in 1m32s
Build and test / test (push) Successful in 1m47s

This commit is contained in:
2026-02-07 02:25:02 +09:00
parent aafda77896
commit 644020ea7f
44 changed files with 69 additions and 66 deletions

16
Cargo.lock generated
View File

@@ -22,9 +22,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.100"
version = "1.0.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea"
[[package]]
name = "ascii-canvas"
@@ -101,9 +101,9 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "chrono"
version = "0.4.42"
version = "0.4.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2"
checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118"
dependencies = [
"iana-time-zone",
"js-sys",
@@ -694,18 +694,18 @@ dependencies = [
[[package]]
name = "thiserror"
version = "2.0.17"
version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "2.0.17"
version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
dependencies = [
"proc-macro2",
"quote",

View File

@@ -12,13 +12,13 @@ edition = "2024"
rust-version = "1.85.0"
[dependencies]
chrono = { version = "0.4.42", features = ["serde"] }
chrono = { version = "0.4.43", features = ["serde"] }
futures-util = { version = "0.3.31", optional = true, features = ["io"] }
lalrpop-util = { version = "0.22.2", features = ["lexer"] }
paste = "1.0.15"
serde = { version = "1.0.228", features = ["derive"] }
thiserror = "2.0.17"
tokio = { version = "1.48.0", optional = true, features = ["io-util"] }
thiserror = "2.0.18"
tokio = { version = "1.49.0", optional = true, features = ["io-util"] }
[features]
default = ["tokio"]
@@ -26,10 +26,10 @@ futures = ["dep:futures-util"]
tokio = ["dep:tokio"]
[dev-dependencies]
anyhow = "1.0.100"
anyhow = "1.0.101"
indoc = "2.0.7"
pretty_assertions = "1.4.1"
tokio = { version = "1.48.0", features = ["macros", "net", "rt"] }
tokio = { version = "1.49.0", features = ["macros", "net", "rt"] }
[build-dependencies]
lalrpop = "0.22.2"

View File

@@ -5,7 +5,10 @@ async fn main() -> anyhow::Result<()> {
let socket = tokio::net::TcpSocket::new_v4()?;
let mut stream = socket.connect("127.0.0.1:6600".parse()?).await?;
let mut client = MpdClient::new(&mut stream).await?;
println!("Connected to MPD server: {}", client.get_mpd_version().unwrap_or("unknown"));
println!(
"Connected to MPD server: {}",
client.get_mpd_version().unwrap_or("unknown")
);
client.play(None).await?;

12
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1765472234,
"narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=",
"lastModified": 1770197578,
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
"type": "github"
},
"original": {
@@ -29,11 +29,11 @@
]
},
"locked": {
"lastModified": 1765680428,
"narHash": "sha256-fyPmRof9SZeI14ChPk5rVPOm7ISiiGkwGCunkhM+eUg=",
"lastModified": 1770347142,
"narHash": "sha256-uz+ZSqXpXEPtdRPYwvgsum/CfNq7AUQ/0gZHqTigiPM=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "eb3898d8ef143d4bf0f7f2229105fc51c7731b2f",
"rev": "2859683cd9ef7858d324c5399b0d8d6652bf4044",
"type": "github"
},
"original": {

View File

@@ -116,7 +116,7 @@ where
/// This assumes the raw string starts with the command name, e.g.
/// `command_name arg1 "arg2 arg3"`
fn parse_raw(raw: &str) -> Result<Self, RequestParserError> {
let (line, rest) = raw
let (line, _rest) = raw
.split_once('\n')
.ok_or(RequestParserError::MissingNewline)?;

View File

@@ -53,7 +53,7 @@ impl CommandResponse for OutputsResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -26,7 +26,7 @@ impl CommandResponse for ChannelsResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -36,7 +36,7 @@ impl CommandResponse for ReadMessagesResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -25,7 +25,7 @@ impl CommandResponse for ListNeighborsResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -86,7 +86,7 @@ impl CommandResponse for AlbumArtResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -101,7 +101,7 @@ impl CommandResponse for CountResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -132,7 +132,7 @@ impl CommandResponse for FindResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -28,7 +28,7 @@ impl CommandResponse for GetFingerprintResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -165,7 +165,7 @@ impl CommandResponse for ListResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -27,7 +27,7 @@ impl CommandResponse for ListAllResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -23,7 +23,7 @@ impl ListAllInfoResponse {
}
impl CommandResponse for ListAllInfoResponse {
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -26,7 +26,7 @@ impl CommandResponse for ListFilesResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -26,7 +26,7 @@ impl CommandResponse for LsInfoResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -26,7 +26,7 @@ impl CommandResponse for ReadCommentsResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -93,7 +93,7 @@ impl CommandResponse for ReadPictureResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -30,7 +30,7 @@ impl CommandResponse for RescanResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -128,7 +128,7 @@ impl SearchResponse {
}
impl CommandResponse for SearchResponse {
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -98,7 +98,7 @@ impl SearchCountResponse {
}
impl CommandResponse for SearchCountResponse {
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -30,7 +30,7 @@ impl CommandResponse for UpdateResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -28,7 +28,7 @@ impl CommandResponse for ReplayGainStatusResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -44,7 +44,7 @@ impl CommandResponse for CurrentSongResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -51,7 +51,7 @@ impl CommandResponse for StatsResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -126,7 +126,7 @@ impl CommandResponse for StatusResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -86,7 +86,7 @@ impl CommandResponse for AddIdResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -24,11 +24,11 @@ impl CommandResponse for PlaylistResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}
fn parse(parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
fn parse(_parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
unimplemented!()
}
}

View File

@@ -157,7 +157,7 @@ impl CommandResponse for PlaylistFindResponse {
todo!()
}
fn from_response_enum(response: Response) -> Option<Self> {
fn from_response_enum(_response: Response) -> Option<Self> {
todo!()
}

View File

@@ -48,11 +48,11 @@ impl CommandResponse for PlaylistIdResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}
fn parse(parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
fn parse(_parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
unimplemented!()
}
}

View File

@@ -50,7 +50,7 @@ impl CommandResponse for PlaylistInfoResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -152,7 +152,7 @@ impl PlaylistSearchResponseEntry {
}
impl CommandResponse for PlaylistSearchResponse {
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}
@@ -160,7 +160,7 @@ impl CommandResponse for PlaylistSearchResponse {
todo!()
}
fn parse(parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
fn parse(_parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
unimplemented!()
}
}

View File

@@ -108,7 +108,7 @@ impl PlChangesResponseEntry {
}
impl CommandResponse for PlChangesResponse {
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}
@@ -116,7 +116,7 @@ impl CommandResponse for PlChangesResponse {
todo!()
}
fn parse(parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
fn parse(_parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
unimplemented!()
}
}

View File

@@ -97,7 +97,7 @@ impl PlChangesPosIdResponseEntry {
}
impl CommandResponse for PlChangesPosIdResponse {
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}
@@ -105,7 +105,7 @@ impl CommandResponse for PlChangesPosIdResponse {
todo!()
}
fn parse(parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
fn parse(_parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
unimplemented!()
}
}

View File

@@ -33,7 +33,7 @@ impl CommandResponse for ConfigResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -40,7 +40,7 @@ impl CommandResponse for DecodersResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -189,7 +189,7 @@ impl StickerFindResponseEntry {
}
impl CommandResponse for StickerFindResponse {
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -85,7 +85,7 @@ impl CommandResponse for StickerListResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -76,7 +76,7 @@ impl CommandResponse for StickerNamesTypesResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -80,11 +80,11 @@ impl CommandResponse for ListPlaylistInfoResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}
fn parse(parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
fn parse(_parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
unimplemented!()
}
}

View File

@@ -40,7 +40,7 @@ impl CommandResponse for ListPlaylistsResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}

View File

@@ -29,7 +29,7 @@ impl CommandResponse for PlaylistLengthResponse {
todo!()
}
fn from_response_enum(response: crate::Response) -> Option<Self> {
fn from_response_enum(_response: crate::Response) -> Option<Self> {
todo!()
}