mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
devices: fix redundant ? inside Ok
Fixes a new clippy warning ("Question mark operator is useless here"). https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark BUG=None TEST=bin/clippy Change-Id: I2888f070030d2838b8fb63e5d98a929f57cdfde7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2864369 Reviewed-by: Dylan Reid <dgreid@chromium.org> Tested-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
0fe970bd9a
commit
d8ff7fa7e4
2 changed files with 4 additions and 4 deletions
|
@ -176,9 +176,9 @@ impl DecoderBackend for libvda::decode::VdaInstance {
|
||||||
fn new_session(&self, format: Format) -> VideoResult<Self::Session> {
|
fn new_session(&self, format: Format) -> VideoResult<Self::Session> {
|
||||||
let profile = libvda::Profile::try_from(format)?;
|
let profile = libvda::Profile::try_from(format)?;
|
||||||
|
|
||||||
Ok(self.open_session(profile).map_err(|e| {
|
self.open_session(profile).map_err(|e| {
|
||||||
error!("failed to open a session for {:?}: {}", format, e);
|
error!("failed to open a session for {:?}: {}", format, e);
|
||||||
VideoError::InvalidOperation
|
VideoError::InvalidOperation
|
||||||
})?)
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,10 +80,10 @@ fn get_drm_device_name(fd: &File) -> Result<String, ()> {
|
||||||
return Err(());
|
return Err(());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(CString::new(&name_bytes[..(version.name_len as usize)])
|
CString::new(&name_bytes[..(version.name_len as usize)])
|
||||||
.map_err(|_| ())?
|
.map_err(|_| ())?
|
||||||
.into_string()
|
.into_string()
|
||||||
.map_err(|_| ())?)
|
.map_err(|_| ())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a `fd` for an opened rendernode device, while filtering out specified
|
/// Returns a `fd` for an opened rendernode device, while filtering out specified
|
||||||
|
|
Loading…
Reference in a new issue