forked from extern/nushell
Merge pull request #967 from jonathandturner/fix_warning
Fix build warnings
This commit is contained in:
commit
9cb573b3b4
@ -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 {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user