Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Radiicall committed Apr 20, 2024
1 parent a78707b commit 3fff58f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion jellyfin-rpc-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {

if std::env::var("RUST_LOG").is_err() {
let _ = tokio::task::spawn_blocking(move || {
std::env::set_var("RUST_LOG", &args.log_level);
std::env::set_var("RUST_LOG", args.log_level);
})
.await;
}
Expand Down
8 changes: 3 additions & 5 deletions jellyfin-rpc/src/services/jellyfin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,10 @@ impl Content {
} else {
state = format!("S{:02}E{:02}", season, first_episode_number);
}
} else if config.jellyfin.add_divider.unwrap_or(false) {
state = format!("S{} - E{}", season, first_episode_number);
} else {
if config.jellyfin.add_divider.unwrap_or(false) {
state = format!("S{} - E{}", season, first_episode_number);
} else {
state = format!("S{}E{}", season, first_episode_number);
}
state = format!("S{}E{}", season, first_episode_number);
};

// Does this if statement work?
Expand Down
4 changes: 2 additions & 2 deletions jellyfin-rpc/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fn media_type_is_none() {
let media_type_2 = MediaType::None;

assert_eq!(
media_type_1.is_none() == false,
media_type_2.is_none() == true
!media_type_1.is_none(),
media_type_2.is_none()
)
}

0 comments on commit 3fff58f

Please sign in to comment.