Fix build warnings

This commit is contained in:
Jonathan Turner 2019-11-16 21:23:04 +13:00
parent a3ffc4baf0
commit ce106bfda9
2 changed files with 3 additions and 3 deletions

View File

@ -609,7 +609,7 @@ fn extract_optional(
name: &str,
tokens: &mut hir::TokensIterator<'_>,
source: &Text,
) -> Result<(Option<(usize, Spanned<Flag>)>), ParseError> {
) -> Result<Option<(usize, Spanned<Flag>)>, ParseError> {
let flag = tokens.extract(|t| t.as_flag(name, source));
match flag {

View File

@ -211,7 +211,7 @@ struct RawImageBuffer {
buffer: Vec<u8>,
}
fn load_from_png_buffer(buffer: &[u8]) -> Option<(RawImageBuffer)> {
fn load_from_png_buffer(buffer: &[u8]) -> Option<RawImageBuffer> {
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<RawImageBuffer> {
use image::ImageDecoder;
let decoder = image::jpeg::JPEGDecoder::new(buffer);