mirror of
https://gitverse.ru/ot/DownOnSpot
synced 2025-12-19 09:54:19 +00:00
Remove call to mem::drop with a reference
This commit is contained in:
parent
e1a76abcb4
commit
e81e0da7e6
1 changed files with 2 additions and 6 deletions
|
|
@ -99,11 +99,10 @@ impl Read for AudioConverter {
|
||||||
}
|
}
|
||||||
size
|
size
|
||||||
}
|
}
|
||||||
Err(_e) => {
|
Err(e) => {
|
||||||
drop(lame);
|
|
||||||
return Err(Error::new(
|
return Err(Error::new(
|
||||||
ErrorKind::InvalidData,
|
ErrorKind::InvalidData,
|
||||||
format!("Lame error: {:?}", _e),
|
format!("Lame error: {:?}", e),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -113,8 +112,6 @@ impl Read for AudioConverter {
|
||||||
if *lame_end {
|
if *lame_end {
|
||||||
return Ok(0);
|
return Ok(0);
|
||||||
}
|
}
|
||||||
// Flush buffer
|
|
||||||
drop(lame);
|
|
||||||
*lame_end = true;
|
*lame_end = true;
|
||||||
Ok(0)
|
Ok(0)
|
||||||
}
|
}
|
||||||
|
|
@ -122,7 +119,6 @@ impl Read for AudioConverter {
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
// Close lame
|
// Close lame
|
||||||
if !*lame_end {
|
if !*lame_end {
|
||||||
drop(lame);
|
|
||||||
*lame_end = true;
|
*lame_end = true;
|
||||||
}
|
}
|
||||||
warn!("Lawton error: {}, calling EOF", e);
|
warn!("Lawton error: {}, calling EOF", e);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue