Skip to content

Commit 2b7e929

Browse files
committed
fix: trim arguments of whitespace
1 parent 0167ba6 commit 2b7e929

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ async fn main() -> Result<(), ServerError> {
6767

6868
// --- Parse CLI Arguments ---
6969
let cli = Cli::parse();
70-
let specid_str = cli.package_spec;
71-
let features = cli.features; // This is Option<Vec<String>>
70+
let specid_str = cli.package_spec.trim().to_string(); // Trim whitespace
71+
let features = cli.features.map(|f| {
72+
f.into_iter().map(|s| s.trim().to_string()).collect() // Trim each feature
73+
});
7274

7375
// Parse the specid string
7476
let spec = PackageIdSpec::parse(&specid_str).map_err(|e| {

0 commit comments

Comments
 (0)