From 92b89e1cb859fbb83304442d8942c1eabcb2232c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Miguel?= <36349314+vrmiguel@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:23:05 -0300 Subject: [PATCH] Clippy lint --- cli/src/control_file.rs | 4 ++-- registry/src/v1/extractor.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/src/control_file.rs b/cli/src/control_file.rs index 9e35876f..82db0f51 100644 --- a/cli/src/control_file.rs +++ b/cli/src/control_file.rs @@ -55,8 +55,8 @@ impl ControlFile { } } -fn strip_value(input: &str) -> &str { - let stripped = input.trim_start_matches(|ch| matches!(ch, ' ' | '=')); +pub fn strip_value(input: &str) -> &str { + let stripped = input.trim_start_matches([' ', '=']); let trimmed = stripped.trim_start(); trimmed.trim_matches('\'') diff --git a/registry/src/v1/extractor.rs b/registry/src/v1/extractor.rs index eb7033d0..03930582 100644 --- a/registry/src/v1/extractor.rs +++ b/registry/src/v1/extractor.rs @@ -164,7 +164,7 @@ fn parse_control_file(extension_name: String, control_file: String) -> ControlFi let mut default_version = None; fn strip_value(input: &str) -> &str { - let stripped = input.trim_start_matches(|ch| matches!(ch, ' ' | '=')); + let stripped = input.trim_start_matches([' ', '=']); let trimmed = stripped.trim_start(); trimmed.trim_matches('\'')