From 237cc1f9576ed23c7a2f9bb34b43e5d07e93f710 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Fri, 10 Jul 2020 21:43:02 +0200 Subject: [PATCH] remove trailing whitespace --- nihav-commonfmt/src/demuxers/mov.rs | 2 +- nihav-core/src/formats.rs | 4 ++-- nihav-ms/src/codecs/msrle.rs | 3 +-- nihav-qt/src/codecs/qdm2qmf.rs | 6 +++--- nihav-qt/src/codecs/svq1.rs | 2 +- nihav-qt/src/codecs/svq3.rs | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/nihav-commonfmt/src/demuxers/mov.rs b/nihav-commonfmt/src/demuxers/mov.rs index 47cfbe3..0b6dd81 100644 --- a/nihav-commonfmt/src/demuxers/mov.rs +++ b/nihav-commonfmt/src/demuxers/mov.rs @@ -239,7 +239,7 @@ fn read_cmov(dmx: &mut MOVDemuxer, strmgr: &mut StreamManager, size: u64) -> Dem dmx.duration = ddmx.duration; dmx.tb_den = ddmx.tb_den; std::mem::swap(&mut dmx.pal, &mut ddmx.pal); - + Ok(size) } diff --git a/nihav-core/src/formats.rs b/nihav-core/src/formats.rs index f96eb53..bb47838 100644 --- a/nihav-core/src/formats.rs +++ b/nihav-core/src/formats.rs @@ -769,7 +769,7 @@ impl NAPixelFormaton { break; } } - name += if self.be { "be" } else { "le" }; + name += if self.be { "be" } else { "le" }; return Some(name); } if depth == 24 || depth != 8 * self.components { @@ -779,7 +779,7 @@ impl NAPixelFormaton { name.push('p'); } if self.get_max_depth() > 8 { - name += if self.be { "be" } else { "le" }; + name += if self.be { "be" } else { "le" }; } Some(name) }, diff --git a/nihav-ms/src/codecs/msrle.rs b/nihav-ms/src/codecs/msrle.rs index e586910..1cc3308 100644 --- a/nihav-ms/src/codecs/msrle.rs +++ b/nihav-ms/src/codecs/msrle.rs @@ -82,7 +82,7 @@ impl RleDecoder { } } } - + Ok(if has_skips { FrameType::P } else { FrameType::I }) } @@ -175,7 +175,6 @@ impl RleDecoder { } } } - Ok(if has_skips { FrameType::P } else { FrameType::I }) } diff --git a/nihav-qt/src/codecs/qdm2qmf.rs b/nihav-qt/src/codecs/qdm2qmf.rs index ece74c2..bd018aa 100644 --- a/nihav-qt/src/codecs/qdm2qmf.rs +++ b/nihav-qt/src/codecs/qdm2qmf.rs @@ -394,7 +394,7 @@ unimplemented!(); let idx = br.read(8) as usize; validate!(idx < self.tables.mod3.len()); for i in 0..5 { - let k = self.tables.mod3[idx][i] as usize; + let k = self.tables.mod3[idx][i] as usize; samples[i * 2] = QUANT_1BIT[jstereo as usize][k]; } } @@ -432,7 +432,7 @@ unimplemented!(); let idx = br.read(8) as usize; validate!(idx < self.tables.mod3.len()); for i in 0..5 { - let k = self.tables.mod3[idx][i] as usize; + let k = self.tables.mod3[idx][i] as usize; samples[i] = QUANT_1BIT[jstereo as usize][k]; } } @@ -448,7 +448,7 @@ unimplemented!(); let idx = br.read(7) as usize; validate!(idx < self.tables.mod5.len()); for i in 0..3 { - let k = self.tables.mod5[idx][i] as usize; + let k = self.tables.mod5[idx][i] as usize; samples[i] = ((k as f32) - 2.0) * 0.5; } } else { diff --git a/nihav-qt/src/codecs/svq1.rs b/nihav-qt/src/codecs/svq1.rs index a6735bb..c65e10d 100644 --- a/nihav-qt/src/codecs/svq1.rs +++ b/nihav-qt/src/codecs/svq1.rs @@ -288,7 +288,7 @@ impl SVQ1Decoder { let (w, h) = if plane == 0 { ((self.width + 15) & !15, (self.height + 15) & !15) } else { - ((self.width / 4 + 15) & !15, (self.height / 4 + 15) & !15) + ((self.width / 4 + 15) & !15, (self.height / 4 + 15) & !15) }; let mvstride = w / 8; self.mvs.truncate(0); diff --git a/nihav-qt/src/codecs/svq3.rs b/nihav-qt/src/codecs/svq3.rs index d166723..c900d3c 100644 --- a/nihav-qt/src/codecs/svq3.rs +++ b/nihav-qt/src/codecs/svq3.rs @@ -656,7 +656,7 @@ println!("slice offset {}", _offset); } } } - + Ok(()) } fn do_mc_p(&mut self, br: &mut BitReader, mb_type: usize, sstate: &mut SState, dframe: &mut NASimpleVideoFrame) -> DecoderResult<()> { -- 2.39.5