From ce106bfda95bf6cc8236006f621c57d3ac33c3c4 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Sat, 16 Nov 2019 21:23:04 +1300 Subject: [PATCH] Fix build warnings --- src/parser/parse_command.rs | 2 +- src/plugins/binaryview.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser/parse_command.rs b/src/parser/parse_command.rs index 32f05fd1ca..cb5111179b 100644 --- a/src/parser/parse_command.rs +++ b/src/parser/parse_command.rs @@ -609,7 +609,7 @@ fn extract_optional( name: &str, tokens: &mut hir::TokensIterator<'_>, source: &Text, -) -> Result<(Option<(usize, Spanned)>), ParseError> { +) -> Result)>, ParseError> { let flag = tokens.extract(|t| t.as_flag(name, source)); match flag { diff --git a/src/plugins/binaryview.rs b/src/plugins/binaryview.rs index 0072df5b4d..4e563beabe 100644 --- a/src/plugins/binaryview.rs +++ b/src/plugins/binaryview.rs @@ -211,7 +211,7 @@ struct RawImageBuffer { buffer: Vec, } -fn load_from_png_buffer(buffer: &[u8]) -> Option<(RawImageBuffer)> { +fn load_from_png_buffer(buffer: &[u8]) -> Option { use image::ImageDecoder; let decoder = image::png::PNGDecoder::new(buffer); @@ -231,7 +231,7 @@ fn load_from_png_buffer(buffer: &[u8]) -> Option<(RawImageBuffer)> { }) } -fn load_from_jpg_buffer(buffer: &[u8]) -> Option<(RawImageBuffer)> { +fn load_from_jpg_buffer(buffer: &[u8]) -> Option { use image::ImageDecoder; let decoder = image::jpeg::JPEGDecoder::new(buffer);