Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
neilkakkar committed Jun 10, 2024
1 parent acec81a commit 2dec74a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion feature-flags/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
serde-pickle = { version = "1.1.1"}
hex = "0.4.3"
sha1 = "0.10.6"
regex = "1.10.4"

Expand Down
16 changes: 8 additions & 8 deletions feature-flags/src/property_matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ pub fn match_property(
.collect::<Vec<String>>()
.contains(&to_string_representation(override_value).to_lowercase());
}
return to_string_representation(value).to_lowercase()
== to_string_representation(override_value).to_lowercase();
to_string_representation(value).to_lowercase()
== to_string_representation(override_value).to_lowercase()
};

if let Some(match_value) = match_value {
Expand All @@ -79,7 +79,7 @@ pub fn match_property(
Ok(!compute_exact_match(value, match_value))
}
} else {
return Ok(false);
Ok(false)
}
}
OperatorType::IsSet => Ok(matching_property_values.contains_key(key)),
Expand Down Expand Up @@ -162,14 +162,14 @@ pub fn match_property(
if let Some(override_value) = to_f64_representation(value) {
Ok(compare(parsed_value, override_value, operator))
} else {
return Err(FlagMatchingError::ValidationError(
Err(FlagMatchingError::ValidationError(
"override value is not a number".to_string(),
));
))
}
}
OperatorType::IsDateExact | OperatorType::IsDateAfter | OperatorType::IsDateBefore => {
// TODO: Handle date operators
return Ok(false);
Ok(false)
// let parsed_date = determine_parsed_date_for_property_matching(match_value);

// if parsed_date.is_none() {
Expand Down Expand Up @@ -212,7 +212,7 @@ fn is_truthy_or_falsy_property_value(value: &Value) -> bool {
.as_array()
.expect("expected array value")
.iter()
.all(|v| is_truthy_or_falsy_property_value(v));
.all(is_truthy_or_falsy_property_value);
}

false
Expand All @@ -236,7 +236,7 @@ fn is_truthy_property_value(value: &Value) -> bool {
.as_array()
.expect("expected array value")
.iter()
.all(|v| is_truthy_property_value(v));
.all(is_truthy_property_value);
}

false
Expand Down

0 comments on commit 2dec74a

Please sign in to comment.