mirror of
https://github.com/nushell/nushell
synced 2024-12-26 04:53:09 +00:00
Fix build warnings
This commit is contained in:
parent
a3ffc4baf0
commit
ce106bfda9
2 changed files with 3 additions and 3 deletions
|
@ -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 a new issue