mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
gpu_display: fix clippy warnings
Remove a redundant closure and an unneeded return statement to assuage `cargo clippy`. BUG=None TEST=bin/clippy Change-Id: I4b6043738de0be3bbf73d05fb3e4c909ce48bc58 Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1751912 Reviewed-by: Zach Reizner <zachr@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
5ce68e42ca
commit
b7bee37759
1 changed files with 2 additions and 2 deletions
|
@ -459,7 +459,7 @@ pub struct DisplayX {
|
|||
|
||||
impl DisplayX {
|
||||
pub fn open_display(display: Option<&str>) -> Result<DisplayX, GpuDisplayError> {
|
||||
let display_cstr = match display.map(|s| CString::new(s)) {
|
||||
let display_cstr = match display.map(CString::new) {
|
||||
Some(Ok(s)) => Some(s),
|
||||
Some(Err(_)) => return Err(GpuDisplayError::InvalidPath),
|
||||
None => None,
|
||||
|
@ -620,7 +620,7 @@ impl DisplayT for DisplayX {
|
|||
height: u32,
|
||||
fourcc: u32,
|
||||
) -> Result<u32, GpuDisplayError> {
|
||||
return Err(GpuDisplayError::Unsupported);
|
||||
Err(GpuDisplayError::Unsupported)
|
||||
}
|
||||
#[allow(unused_variables)]
|
||||
fn release_import(&mut self, import_id: u32) {
|
||||
|
|
Loading…
Reference in a new issue