Skip to content

Commit 2fc644a

Browse files
committed
test(spec): Make room for more tests
1 parent 87f4b1b commit 2fc644a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/cargo/core/package_id_spec.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,11 +444,10 @@ mod tests {
444444
fn matching() {
445445
let url = Url::parse("https://example.com").unwrap();
446446
let sid = SourceId::for_registry(&url).unwrap();
447-
let foo = PackageId::new("foo", "1.2.3", sid).unwrap();
448-
let bar = PackageId::new("bar", "1.2.3", sid).unwrap();
449447

448+
let foo = PackageId::new("foo", "1.2.3", sid).unwrap();
450449
assert!(PackageIdSpec::parse("foo").unwrap().matches(foo));
451-
assert!(!PackageIdSpec::parse("foo").unwrap().matches(bar));
450+
assert!(!PackageIdSpec::parse("bar").unwrap().matches(foo));
452451
assert!(PackageIdSpec::parse("foo:1.2.3").unwrap().matches(foo));
453452
assert!(!PackageIdSpec::parse("foo:1.2.2").unwrap().matches(foo));
454453
assert!(PackageIdSpec::parse("foo@1.2.3").unwrap().matches(foo));

0 commit comments

Comments
 (0)