diff --git a/crates/uv-workspace/src/workspace.rs b/crates/uv-workspace/src/workspace.rs index e3e52d8669bd..19fbc9baca90 100644 --- a/crates/uv-workspace/src/workspace.rs +++ b/crates/uv-workspace/src/workspace.rs @@ -273,17 +273,7 @@ impl Workspace { .as_ref() .map(|optional_dependencies| { // It's a `BTreeMap` so the keys are sorted. - optional_dependencies - .iter() - .filter_map(|(name, dependencies)| { - if dependencies.is_empty() { - None - } else { - Some(name) - } - }) - .cloned() - .collect::>() + optional_dependencies.keys().cloned().collect::>() }) .unwrap_or_default();