refactor(tvix/store/fs): use while let statement
Suggested by clippy. Change-Id: I686b1abcb40fab42017972a3f814fae29fa70c25 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9712 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: edef <edef@edef.eu> Tested-by: BuildkiteCI
This commit is contained in:
parent
4da906bf34
commit
c9e90b4dd7
1 changed files with 16 additions and 22 deletions
|
|
@ -21,8 +21,7 @@ where
|
||||||
FS: FileSystem + Sync + Send,
|
FS: FileSystem + Sync + Send,
|
||||||
{
|
{
|
||||||
fn start(&mut self) -> io::Result<()> {
|
fn start(&mut self) -> io::Result<()> {
|
||||||
loop {
|
while let Some((reader, writer)) = self
|
||||||
if let Some((reader, writer)) = self
|
|
||||||
.channel
|
.channel
|
||||||
.get_request()
|
.get_request()
|
||||||
.map_err(|_| io::Error::from_raw_os_error(libc::EINVAL))?
|
.map_err(|_| io::Error::from_raw_os_error(libc::EINVAL))?
|
||||||
|
|
@ -33,9 +32,7 @@ where
|
||||||
{
|
{
|
||||||
match e {
|
match e {
|
||||||
// This indicates the session has been shut down.
|
// This indicates the session has been shut down.
|
||||||
fuse_backend_rs::Error::EncodeMessage(e)
|
fuse_backend_rs::Error::EncodeMessage(e) if e.raw_os_error() == Some(BADFD) => {
|
||||||
if e.raw_os_error() == Some(BADFD) =>
|
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
error => {
|
error => {
|
||||||
|
|
@ -44,9 +41,6 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue