mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2026-11-16 00:34:13 +00:00
clippy: Use stream_position() to get current position
This commit is contained in:
1 parent
313f5408ca
commit
1234c897a3
1 file changed
+3
-3
+3
-3
@@ -4,7 +4,7 @@ use std::path::Path;
|
|||||||
|
|
||||||
use std::io::Cursor;
|
use std::io::Cursor;
|
||||||
use std::io::SeekFrom;
|
use std::io::SeekFrom;
|
||||||
use std::io::SeekFrom::{Current, Start};
|
use std::io::SeekFrom::Start;
|
||||||
use std::io::{BufReader, Read, Seek};
|
use std::io::{BufReader, Read, Seek};
|
||||||
|
|
||||||
use super::bext::Bext;
|
use super::bext::Bext;
|
||||||
@@ -116,7 +116,7 @@ impl<R: Read + Seek> AudioFrameReader<R> {
|
|||||||
|
|
||||||
let framed_bits_per_sample = self.format.block_alignment * 8 / self.format.channel_count;
|
let framed_bits_per_sample = self.format.block_alignment * 8 / self.format.channel_count;
|
||||||
|
|
||||||
let tell = self.inner.seek(Current(0))?;
|
let tell = self.inner.stream_position()?;
|
||||||
|
|
||||||
if (tell - self.start) < self.length {
|
if (tell - self.start) < self.length {
|
||||||
for n in 0..(self.format.channel_count as usize) {
|
for n in 0..(self.format.channel_count as usize) {
|
||||||
@@ -145,7 +145,7 @@ impl<R: Read + Seek> AudioFrameReader<R> {
|
|||||||
|
|
||||||
let framed_bits_per_sample = self.format.block_alignment * 8 / self.format.channel_count;
|
let framed_bits_per_sample = self.format.block_alignment * 8 / self.format.channel_count;
|
||||||
|
|
||||||
let tell = self.inner.seek(Current(0))?;
|
let tell = self.inner.stream_position()?;
|
||||||
|
|
||||||
if (tell - self.start) < self.length {
|
if (tell - self.start) < self.length {
|
||||||
for n in 0..(self.format.channel_count as usize) {
|
for n in 0..(self.format.channel_count as usize) {
|
||||||
|
|||||||
Reference in new issue
Block a user