Avoid returning Some for narrowing no-ops (#10705)
The net effect here is (I think) just that we end up logging more "narrowing" outcomes than we have in practice.
This commit is contained in:
@@ -100,6 +100,8 @@ impl PythonRequirement {
|
||||
|
||||
/// Narrow the [`PythonRequirement`] to the given version, if it's stricter (i.e., greater)
|
||||
/// than the current `Requires-Python` minimum.
|
||||
///
|
||||
/// Returns `None` if the given range is not narrower than the current range.
|
||||
pub fn narrow(&self, target: &RequiresPythonRange) -> Option<Self> {
|
||||
Some(Self {
|
||||
exact: self.exact.clone(),
|
||||
|
||||
Reference in New Issue
Block a user