mirror of
https://github.com/loot/loot-condition-interpreter.git
synced 2026-07-27 14:16:09 -07:00
Configure a few more clippy lints
This commit is contained in:
@@ -56,6 +56,7 @@ pedantic = { level = "deny", priority = -1 }
|
||||
allow_attributes = "deny"
|
||||
as_conversions = "deny"
|
||||
as_underscore = "forbid"
|
||||
as_pointer_underscore = "forbid"
|
||||
assertions_on_result_states = "deny"
|
||||
big_endian_bytes = "forbid"
|
||||
cfg_not_test = "forbid"
|
||||
@@ -65,6 +66,7 @@ dbg_macro = "forbid"
|
||||
decimal_literal_representation = "forbid"
|
||||
default_numeric_fallback = "forbid"
|
||||
doc_include_without_cfg = "forbid"
|
||||
else_if_without_else = "forbid"
|
||||
empty_drop = "forbid"
|
||||
error_impl_error = "deny"
|
||||
exit = "forbid"
|
||||
@@ -82,6 +84,7 @@ integer_division = "deny"
|
||||
integer_division_remainder_used = "deny"
|
||||
iter_over_hash_type = "deny"
|
||||
let_underscore_must_use = "forbid"
|
||||
let_underscore_untyped = "forbid"
|
||||
lossy_float_literal = "forbid"
|
||||
map_err_ignore = "forbid"
|
||||
map_with_unused_argument_over_ranges = "forbid"
|
||||
@@ -108,6 +111,7 @@ rc_mutex = "forbid"
|
||||
redundant_type_annotations = "forbid"
|
||||
ref_patterns = "forbid"
|
||||
rest_pat_in_fully_bound_structs = "forbid"
|
||||
return_and_then = "forbid"
|
||||
str_to_string = "forbid"
|
||||
string_lit_chars_any = "forbid"
|
||||
string_slice = "forbid"
|
||||
|
||||
+3
-2
@@ -98,8 +98,9 @@ pub(crate) unsafe fn to_path_buf_vec(
|
||||
}
|
||||
|
||||
unsafe fn map_plugin_version(c_object: &plugin_version) -> Result<(String, String), c_int> {
|
||||
to_str(c_object.plugin_name)
|
||||
.and_then(|n| to_str(c_object.version).map(|v| (n.into(), v.into())))
|
||||
let name = to_str(c_object.plugin_name)?;
|
||||
|
||||
to_str(c_object.version).map(|v| (name.into(), v.into()))
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn map_plugin_versions(
|
||||
|
||||
+7
-9
@@ -187,15 +187,13 @@ impl str::FromStr for Expression {
|
||||
type Err = Error;
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
parse_expression(s)
|
||||
.map_err(Error::from)
|
||||
.and_then(|(remaining_input, expression)| {
|
||||
if remaining_input.is_empty() {
|
||||
Ok(expression)
|
||||
} else {
|
||||
Err(Error::UnconsumedInput(remaining_input.to_owned()))
|
||||
}
|
||||
})
|
||||
let (remaining_input, expression) = parse_expression(s)?;
|
||||
|
||||
if remaining_input.is_empty() {
|
||||
Ok(expression)
|
||||
} else {
|
||||
Err(Error::UnconsumedInput(remaining_input.to_owned()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user