Add clippy (#191)
* Organize imports Use rustfmt to organize imports. Resolve #162 * remove unused imports * Fix clippy complaints * add clippy github action * remove comment for @arnaucube
This commit is contained in:
parent
24ff82dd3d
commit
0759d6e165
27 changed files with 217 additions and 339 deletions
|
|
@ -252,10 +252,9 @@ impl From<CustomPredicateBatch> for middleware::CustomPredicateBatch {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
|
||||
/// NOTE: fields are not public (outside of crate) to enforce the struct instantiation through
|
||||
/// the `::and/or` methods, which performs checks on the values.
|
||||
pub struct CustomPredicate {
|
||||
/// NOTE: fields are not public (outside of crate) to enforce the struct instantiation through
|
||||
/// the `::and/or` methods, which performs checks on the values.
|
||||
|
||||
/// true for "and", false for "or"
|
||||
pub(crate) conjunction: bool,
|
||||
pub(crate) statements: Vec<StatementTmpl>,
|
||||
|
|
@ -550,7 +549,7 @@ fn resolve_wildcard(args: &[&str], priv_args: &[&str], v: &KeyOrWildcardStr) ->
|
|||
args.iter()
|
||||
.chain(priv_args.iter())
|
||||
.enumerate()
|
||||
.find_map(|(i, name)| (&s == name).then_some(IndexedWildcard::new(s.clone(), i)))
|
||||
.find_map(|(i, name)| (s == name).then_some(IndexedWildcard::new(s.clone(), i)))
|
||||
.unwrap(),
|
||||
),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue