Skip to content

Commit 92a10b8

Browse files
committed
Rust: address clippy warnings
1 parent 23e6a82 commit 92a10b8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

rust/extractor/src/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ fn to_cfg_overrides(specs: &Vec<String>) -> CfgOverrides {
136136
let mut disabled_cfgs = Vec::new();
137137
let mut has_test_explicitly_enabled = false;
138138
for spec in specs {
139-
if spec.starts_with("-") {
139+
if let Some(spec) = spec.strip_prefix("-") {
140140
disabled_cfgs.push(to_cfg_override(&spec[1..]));
141141
} else {
142142
enabled_cfgs.push(to_cfg_override(spec));

rust/extractor/src/config/deserialize_vec.rs

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ impl<'de, T: From<String>> Visitor<'de> for VectorVisitor<T> {
4141
/// deserialize into a vector of `T` either of:
4242
/// * a sequence of elements serializable into `String`s, or
4343
/// * a single element serializable into `String`, then split on `,` and `\n`
44+
///
4445
/// This is required to be in scope when the `extractor_cli_config` macro is used.
4546
pub(crate) fn deserialize_newline_or_comma_separated<'a, D: Deserializer<'a>, T: From<String>>(
4647
deserializer: D,

0 commit comments

Comments
 (0)