U11: ec-mp3 drop unused FrameHeader::main_data_len and same_stream (no callers in workspace, edith or yumush)
Browse files at this commita1e992a6afe93c217e466b6a483421a7adf47232Parent: e4fbe991 changed file +0 -18
- crates/ec-mp3/src/header.rs +0 -18
crates/ec-mp3/src/header.rsmodified+0 -18
| @@ -247,24 +247,6 @@ impl FrameHeader { | |||
| 247 | _ => 72 * bits / rate + pad, | 247 | _ => 72 * bits / rate + pad, |
| 248 | }) | 248 | }) |
| 249 | } | 249 | } |
| 250 | - | ||
| 251 | - /// Bytes of main data this frame carries: everything after the header, the | ||
| 252 | - /// optional CRC and the side info. | ||
| 253 | - pub fn main_data_len(&self) -> Option<usize> { | ||
| 254 | - let len = self.frame_len()?; | ||
| 255 | - let overhead = 4 + usize::from(self.crc) * 2 + self.side_info_len(); | ||
| 256 | - Some(len.saturating_sub(overhead)) | ||
| 257 | - } | ||
| 258 | - | ||
| 259 | - /// True when two headers describe the same stream configuration — the test | ||
| 260 | - /// a resync uses to tell a real frame from a byte pattern that looked like | ||
| 261 | - /// one. | ||
| 262 | - pub fn same_stream(&self, other: &FrameHeader) -> bool { | ||
| 263 | - self.version == other.version | ||
| 264 | - && self.layer == other.layer | ||
| 265 | - && self.sample_rate == other.sample_rate | ||
| 266 | - && self.mode.channels() == other.mode.channels() | ||
| 267 | - } | ||
| 268 | } | 250 | } |
| 269 | 251 | ||
| 270 | /// CRC-16 over a header and a run of protected *bits*, as Layers I and II | 252 | /// CRC-16 over a header and a run of protected *bits*, as Layers I and II |