Skip to content

Commit f0d26a0

Browse files
committed
fix: oops
1 parent 07dd760 commit f0d26a0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/internal/incompatibility.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,10 @@ impl<P: Package, V: Version> Incompatibility<P, V> {
104104

105105
/// Build an incompatibility from a given dependency.
106106
pub fn from_dependency(package: P, version: V, dep: (&P, &Range<V>)) -> Self {
107-
let range1 = Range::exact(version.clone());
108107
let (p2, range2) = dep;
109108
Self {
110109
package_terms: SmallMap::Two([
111-
(package.clone(), Term::Positive(range1)),
110+
(package, Term::Positive(Range::exact(version))),
112111
(p2.clone(), Term::Negative(range2.clone())),
113112
]),
114113
kind: Kind::FromDependency,
@@ -130,7 +129,7 @@ impl<P: Package, V: Version> Incompatibility<P, V> {
130129
/// (provided that no other version of foo exists between 1.0.0 and 2.0.0).
131130
/// We could collapse them into { foo (1.0.0 ∪ 1.1.0), not bar ^1.0.0 }
132131
/// without having to check the existence of other versions though.
133-
/// And it would even keep the same [Kind]: [FromDependencyOf](Kind::FromDependencyOf) foo.
132+
/// And it would even keep the same [Kind]: [FromDependencyOf](Kind::FromDependency) foo.
134133
///
135134
/// Here we do the simple stupid thing of just growing the Vec.
136135
/// TODO: improve this.

0 commit comments

Comments
 (0)