Skip to content

Commit

Permalink
Addressed Clippy comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
zlogic committed May 10, 2024
1 parent fa8cf9f commit c780dee
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ fn main() {

fn run_animation(args: Args) {
let renderer = gpu::Gpu::init().expect("Failed to init GPU");
let player = if let Some(path) = args.sound_device {
Some(sound::Player::new(&path).expect("Failed to init audio device"))
} else {
None
};
let player = args.sound_device.map(|path| sound::Player::new(&path).expect("Failed to init audio device"));

println!("Using video device: {}", renderer.device_name());

Expand Down

0 comments on commit c780dee

Please sign in to comment.