aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Maier <>2026-03-08 09:07:39 +0100
committerJonas Maier <>2026-03-08 09:07:39 +0100
commit2b2ea4fe9a9aa1d0302f7f74b2b4d2b1e4243787 (patch)
tree6a62d98938fd8c49d31e0b282aee125b93b140ac
parentce05ae9b6512820c4600c98e6c879ea5dbed8d2b (diff)
downloadpish-2b2ea4fe9a9aa1d0302f7f74b2b4d2b1e4243787.tar.gz
warnings
-rw-r--r--pish_derive/src/lib.rs4
-rw-r--r--src/run/builtin.rs1
2 files changed, 3 insertions, 2 deletions
diff --git a/pish_derive/src/lib.rs b/pish_derive/src/lib.rs
index 0d06aa5..3a296fc 100644
--- a/pish_derive/src/lib.rs
+++ b/pish_derive/src/lib.rs
@@ -1,4 +1,4 @@
-use proc_macro::{Literal, TokenStream};
+use proc_macro::TokenStream;
use quote::{ToTokens, quote};
use syn::{Data, DeriveInput, Fields, parse_macro_input};
@@ -66,7 +66,7 @@ pub fn derive_cli(input: TokenStream) -> TokenStream {
// after loop
if is_bool {
- field_parsers_post.push(quote!{ let #ident = #ident.unwrap_or(false); });
+ field_parsers_post.push(quote! { let #ident = #ident.unwrap_or(false); });
} else if !is_option {
field_parsers_post.push(quote!{ let Some(#ident) = #ident else { return Err(ArgParseError::MissingArg(#name_str)) }; });
}
diff --git a/src/run/builtin.rs b/src/run/builtin.rs
index b566e61..341d98d 100644
--- a/src/run/builtin.rs
+++ b/src/run/builtin.rs
@@ -9,6 +9,7 @@ use super::{Builtin, BuiltinError as Error, BuiltinResult as Result};
use crate::parse::CmdDisplay;
use crate::*;
+#[allow(unused)]
pub enum ArgParseError<'a> {
LeftoverArg(&'a [u8]),
MissingArg(&'static str),