Fix straggler needless_return violations

These are not caught during presubmit or when running cargo clippy but
nonetheless exist and should be cleaned up.

BUG=b:157245930, crbug:908640
TEST=cargo build

Change-Id: I8b4d79bf224b800fbdfeaa7729c5f283d42908e9
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4039522
Auto-Submit: Clarissa Garvey <clarissagarvey@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Clarissa Garvey 2022-11-19 01:01:21 +00:00 committed by crosvm LUCI
parent 3ef6e12b19
commit 76cf0e6bf6
3 changed files with 6 additions and 5 deletions

View file

@ -78,9 +78,9 @@ impl EventAsyncWrapper for EventAsync {
impl AudioStreamsExecutor for super::Executor {
#[cfg(unix)]
fn async_unix_stream(&self, stream: UnixStream) -> Result<AsyncStream> {
return Ok(Box::new(IoSourceWrapper {
Ok(Box::new(IoSourceWrapper {
source: self.async_from(AsyncWrapper::new(stream))?,
}));
}))
}
/// # Safety

View file

@ -19,10 +19,11 @@ pub struct AsyncTube {
impl AsyncTube {
pub fn new(ex: &Executor, tube: Tube) -> io::Result<AsyncTube> {
return Ok(AsyncTube {
Ok(AsyncTube {
inner: ex.async_from(tube)?,
});
})
}
pub async fn next<T: DeserializeOwned>(&self) -> TubeResult<T> {
self.inner.wait_readable().await.unwrap();
self.inner.as_source().recv()

View file

@ -26,7 +26,7 @@ fn get_cross_compile_prefix() -> String {
} else {
env::var("CARGO_CFG_TARGET_ENV").unwrap()
};
return format!("{}-{}-{}-", arch, os, env);
format!("{}-{}-{}-", arch, os, env)
}
fn build_libtpm2(out_dir: &Path) -> Result<()> {