diff options
Diffstat (limited to 'gen/cmd/src')
-rw-r--r-- | gen/cmd/src/app.rs | 4 | ||||
-rw-r--r-- | gen/cmd/src/cfg.rs | 8 | ||||
-rw-r--r-- | gen/cmd/src/main.rs | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/gen/cmd/src/app.rs b/gen/cmd/src/app.rs index bfad8562..645b05d5 100644 --- a/gen/cmd/src/app.rs +++ b/gen/cmd/src/app.rs @@ -84,7 +84,7 @@ pub(super) fn from_args() -> Opt { } } else { Include { - path: include.to_owned(), + path: include.clone(), kind: IncludeKind::Quoted, } } @@ -122,7 +122,7 @@ pub(super) fn from_args() -> Opt { fn arg_input() -> Arg { Arg::new(INPUT) .help("Input Rust source file containing #[cxx::bridge].") - .required_unless_present_any(&[HEADER, HELP]) + .required_unless_present_any([HEADER, HELP]) .value_parser(ValueParser::path_buf()) } diff --git a/gen/cmd/src/cfg.rs b/gen/cmd/src/cfg.rs index 29f0b9bc..92b954cd 100644 --- a/gen/cmd/src/cfg.rs +++ b/gen/cmd/src/cfg.rs @@ -5,7 +5,7 @@ use syn::parse::ParseStream; use syn::{Ident, LitBool, LitStr, Token}; #[derive(Ord, PartialOrd, Eq, PartialEq)] -pub enum CfgValue { +pub(crate) enum CfgValue { Bool(bool), Str(String), } @@ -15,12 +15,12 @@ impl CfgValue { const TRUE: Self = CfgValue::Bool(true); } -pub struct FlagsCfgEvaluator { +pub(crate) struct FlagsCfgEvaluator { map: Map<String, Set<CfgValue>>, } impl FlagsCfgEvaluator { - pub fn new(map: Map<String, Set<CfgValue>>) -> Self { + pub(crate) fn new(map: Map<String, Set<CfgValue>>) -> Self { FlagsCfgEvaluator { map } } } @@ -73,7 +73,7 @@ impl Debug for CfgValue { } } -pub fn parse(input: ParseStream) -> syn::Result<(String, CfgValue)> { +pub(crate) fn parse(input: ParseStream) -> syn::Result<(String, CfgValue)> { let ident: Ident = input.parse()?; let name = ident.to_string(); if input.is_empty() { diff --git a/gen/cmd/src/main.rs b/gen/cmd/src/main.rs index 4d5edfd1..227a3637 100644 --- a/gen/cmd/src/main.rs +++ b/gen/cmd/src/main.rs @@ -6,8 +6,10 @@ clippy::enum_glob_use, clippy::if_same_then_else, clippy::inherent_to_string, + clippy::into_iter_without_iter, clippy::items_after_statements, clippy::large_enum_variant, + clippy::map_clone, clippy::match_bool, clippy::match_on_vec_items, clippy::match_same_arms, @@ -15,18 +17,16 @@ clippy::needless_pass_by_value, clippy::new_without_default, clippy::nonminimal_bool, - clippy::option_if_let_else, clippy::or_fun_call, clippy::redundant_else, clippy::shadow_unrelated, clippy::similar_names, clippy::single_match_else, clippy::struct_excessive_bools, + clippy::struct_field_names, clippy::too_many_arguments, clippy::too_many_lines, - clippy::toplevel_ref_arg, - // clippy bug: https://github.com/rust-lang/rust-clippy/issues/6983 - clippy::wrong_self_convention + clippy::toplevel_ref_arg )] mod app; |