Skip to content

Commit

Permalink
refactor: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeStanger committed Oct 10, 2023
1 parent 558c3e1 commit 3b46dcc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dirs = "5.0.1"
toml = "0.8.2"
regex = "1.9.6"
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
reqwest = { version = "0.11.22", features = ["json"] }
tokio = { version = "1.33.0", features = ["rt-multi-thread"] }
universal-config = { version = "0.4.3", default-features = false, features = ["toml"] }
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ impl<'a> Service<'a> {
drpc.on_ready(move |_| {
event_tx
.try_send(ServiceEvent::Ready)
.expect("channel to be open")
.expect("channel to be open");
});

drpc.on_error(move |err| {
if err
.event
.get("error_message")
.and_then(|v| v.as_str())
.and_then(serde_json::value::Value::as_str)
.map(|str| str == "Io Error")
.unwrap_or_default()
{
Expand All @@ -133,7 +133,7 @@ impl<'a> Service<'a> {
}

fn start(&mut self) {
self.drpc.start()
self.drpc.start();
}

async fn update_state(&mut self, mpd: &MultiHostClient<'a>, status: &Status) {
Expand Down

0 comments on commit 3b46dcc

Please sign in to comment.