]> git.nihav.org Git - nihav-player.git/commitdiff
fix clippy warnings master
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 4 Feb 2026 21:15:55 +0000 (22:15 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 4 Feb 2026 21:15:55 +0000 (22:15 +0100)
videoplayer/src/main.rs
videoplayer/src/videodec.rs

index f89d865b5570ff493210fbd78ee4d6f02ae6eadd..658a55ccf6ae9fd82b509246c243de250644fd03 100644 (file)
@@ -907,8 +907,8 @@ impl Player {
         for i in 0..dmx.get_num_streams() {
             let s = dmx.get_stream(i).unwrap();
             let str_id = s.get_id();
-            if !(self.has_video && str_id == self.video_str) &&
-               !(self.has_audio && str_id == self.audio_str) {
+            if !((self.has_video && str_id == self.video_str) ||
+                 (self.has_audio && str_id == self.audio_str)) {
                 dmx.set_ignored_stream(i);
             }
         }
@@ -959,7 +959,7 @@ impl Player {
                 "NihAV player".to_owned()
             };
         window.set_title(&wname).expect("set window title");
-        let mut icon_data = ICON.clone();
+        let mut icon_data = ICON;
         let icon = sdl2::surface::Surface::from_data(&mut icon_data, 32, 32, 96, PixelFormatEnum::RGB24).expect("create icon");
         window.set_icon(icon);
         if window.size() != (width as u32, height as u32) {
index f54e46ad051e1cb2e019c88f4845baa0c84871ef..ca9fa622a3ae7ec3effb7465618d18748e2e6b42 100644 (file)
@@ -306,7 +306,7 @@ fn start_video_decoding(width: usize, height: usize, tb_num: u32, tb_den: u32, v
                     Ok(PktSendEvent::HurryUp) => {
                         skip_mode = skip_mode.advance();
                         if let DecoderType::Video(ref mut dec, ref mut _reord) = vdec.dec.dec {
-                            println!("setting hurry up mode to {}", skip_mode.to_string());
+                            println!("setting hurry up mode to {skip_mode}");
                             dec.set_options(&[NAOption{
                                 name: FRAME_SKIP_OPTION,
                                 value: NAValue::String(skip_mode.to_string()),