chore: Fix more clippy lints

This commit is contained in:
Mike Welsh 2020-03-12 21:40:48 -07:00
parent 13b039fa34
commit 24a557807d
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ impl<R: AsRef<[u8]> + Default> SeekableDecoder for Mp3Decoder<Cursor<R>> {
// TODO: This is funky. // TODO: This is funky.
// I want to reset the `BitStream` and `Cursor` to their initial positions, // I want to reset the `BitStream` and `Cursor` to their initial positions,
// but have to work around the borrowing rules of Rust. // but have to work around the borrowing rules of Rust.
let mut cursor = std::mem::replace(self.decoder.reader_mut(), Default::default()); let mut cursor = std::mem::take(self.decoder.reader_mut());
cursor.set_position(0); cursor.set_position(0);
*self = Mp3Decoder::new(self.num_channels, self.sample_rate, cursor); *self = Mp3Decoder::new(self.num_channels, self.sample_rate, cursor);
} }

View File

@ -73,7 +73,7 @@ impl<'gc> EditText<'gc> {
// See SWF19 pp. 173-174 for supported HTML tags. // See SWF19 pp. 173-174 for supported HTML tags.
if c == '<' { if c == '<' {
// Skip characters until we see a close bracket. // Skip characters until we see a close bracket.
chars.by_ref().skip_while(|&x| x != '>').next(); chars.by_ref().find(|&x| x == '>');
} else { } else {
result.push(c); result.push(c);
} }