forked from extern/nushell
Fix build warnings
This commit is contained in:
parent
a3ffc4baf0
commit
ce106bfda9
@ -609,7 +609,7 @@ fn extract_optional(
|
|||||||
name: &str,
|
name: &str,
|
||||||
tokens: &mut hir::TokensIterator<'_>,
|
tokens: &mut hir::TokensIterator<'_>,
|
||||||
source: &Text,
|
source: &Text,
|
||||||
) -> Result<(Option<(usize, Spanned<Flag>)>), ParseError> {
|
) -> Result<Option<(usize, Spanned<Flag>)>, ParseError> {
|
||||||
let flag = tokens.extract(|t| t.as_flag(name, source));
|
let flag = tokens.extract(|t| t.as_flag(name, source));
|
||||||
|
|
||||||
match flag {
|
match flag {
|
||||||
|
@ -211,7 +211,7 @@ struct RawImageBuffer {
|
|||||||
buffer: Vec<u8>,
|
buffer: Vec<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn load_from_png_buffer(buffer: &[u8]) -> Option<(RawImageBuffer)> {
|
fn load_from_png_buffer(buffer: &[u8]) -> Option<RawImageBuffer> {
|
||||||
use image::ImageDecoder;
|
use image::ImageDecoder;
|
||||||
|
|
||||||
let decoder = image::png::PNGDecoder::new(buffer);
|
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;
|
use image::ImageDecoder;
|
||||||
|
|
||||||
let decoder = image::jpeg::JPEGDecoder::new(buffer);
|
let decoder = image::jpeg::JPEGDecoder::new(buffer);
|
||||||
|
Loading…
Reference in New Issue
Block a user