clippy: remove unnecessary let
binding
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
96b7483138
commit
05725ac9a4
@ -441,8 +441,7 @@ impl Shell {
|
|||||||
R: 'static,
|
R: 'static,
|
||||||
{
|
{
|
||||||
let shell: &mut Shell = unsafe { std::mem::transmute(SHELL.unwrap()) };
|
let shell: &mut Shell = unsafe { std::mem::transmute(SHELL.unwrap()) };
|
||||||
let result = call(&mut *shell).await;
|
call(&mut *shell).await
|
||||||
result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn shell(mut self) -> Result<(), Error> {
|
pub async fn shell(mut self) -> Result<(), Error> {
|
||||||
|
@ -62,15 +62,11 @@ impl <'a> ChunkArchiveWriter<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn write_all(&mut self, data: &[u8]) -> Result<bool, std::io::Error> {
|
fn write_all(&mut self, data: &[u8]) -> Result<bool, std::io::Error> {
|
||||||
let result = match self.writer {
|
match self.writer {
|
||||||
Some(ref mut writer) => {
|
Some(ref mut writer) => writer.write_all(data),
|
||||||
let leom = writer.write_all(data)?;
|
|
||||||
Ok(leom)
|
|
||||||
}
|
|
||||||
None => proxmox::io_bail!(
|
None => proxmox::io_bail!(
|
||||||
"detected write after archive finished - internal error"),
|
"detected write after archive finished - internal error"),
|
||||||
};
|
}
|
||||||
result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Write chunk into archive.
|
/// Write chunk into archive.
|
||||||
|
Loading…
Reference in New Issue
Block a user