Skip to content

Commit

Permalink
Rust: address clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
aibaars committed Dec 17, 2024
1 parent 23e6a82 commit 92a10b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rust/extractor/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ fn to_cfg_overrides(specs: &Vec<String>) -> CfgOverrides {
let mut disabled_cfgs = Vec::new();
let mut has_test_explicitly_enabled = false;
for spec in specs {
if spec.starts_with("-") {
if let Some(spec) = spec.strip_prefix("-") {
disabled_cfgs.push(to_cfg_override(&spec[1..]));
} else {
enabled_cfgs.push(to_cfg_override(spec));
Expand Down
1 change: 1 addition & 0 deletions rust/extractor/src/config/deserialize_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ impl<'de, T: From<String>> Visitor<'de> for VectorVisitor<T> {
/// deserialize into a vector of `T` either of:
/// * a sequence of elements serializable into `String`s, or
/// * a single element serializable into `String`, then split on `,` and `\n`
///
/// This is required to be in scope when the `extractor_cli_config` macro is used.
pub(crate) fn deserialize_newline_or_comma_separated<'a, D: Deserializer<'a>, T: From<String>>(
deserializer: D,
Expand Down

0 comments on commit 92a10b8

Please sign in to comment.