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:
Daniel Verkamp 2019-08-13 16:30:25 -07:00 committed by Commit Bot
parent 5ce68e42ca
commit b7bee37759

View file

@ -459,7 +459,7 @@ pub struct DisplayX {
impl DisplayX { impl DisplayX {
pub fn open_display(display: Option<&str>) -> Result<DisplayX, GpuDisplayError> { 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(Ok(s)) => Some(s),
Some(Err(_)) => return Err(GpuDisplayError::InvalidPath), Some(Err(_)) => return Err(GpuDisplayError::InvalidPath),
None => None, None => None,
@ -620,7 +620,7 @@ impl DisplayT for DisplayX {
height: u32, height: u32,
fourcc: u32, fourcc: u32,
) -> Result<u32, GpuDisplayError> { ) -> Result<u32, GpuDisplayError> {
return Err(GpuDisplayError::Unsupported); Err(GpuDisplayError::Unsupported)
} }
#[allow(unused_variables)] #[allow(unused_variables)]
fn release_import(&mut self, import_id: u32) { fn release_import(&mut self, import_id: u32) {