Skip to content

Commit

Permalink
Properly fix assertion and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Apr 26, 2019
1 parent 2de44c4 commit f4aac94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/cargo/core/dependency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ impl Dependency {

/// Sets whether the dependency is public.
pub fn set_public(&mut self, public: bool) -> &mut Dependency {
if !public {
// Setting 'private' only makes sense for normal dependencies
if public {
// Setting 'public' only makes sense for normal dependencies
assert_eq!(self.kind(), Kind::Normal);
}
Rc::make_mut(&mut self.inner).public = public;
Expand Down
8 changes: 4 additions & 4 deletions tests/testsuite/support/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ fn meta_test_deep_pretty_print_registry() {
pkg!(("baz", "1.0.1")),
pkg!(("cat", "1.0.2") => [dep_req_kind("other", "2", Kind::Build, false)]),
pkg!(("cat", "1.0.3") => [dep_req_kind("other", "2", Kind::Development, false)]),
pkg!(("cat", "1.0.4") => [dep_req_kind("other", "2", Kind::Build, true)]),
pkg!(("cat", "1.0.5") => [dep_req_kind("other", "2", Kind::Development, true)]),
pkg!(("cat", "1.0.4") => [dep_req_kind("other", "2", Kind::Build, false)]),
pkg!(("cat", "1.0.5") => [dep_req_kind("other", "2", Kind::Development, false)]),
pkg!(("dep_req", "1.0.0")),
pkg!(("dep_req", "2.0.0")),
])
Expand All @@ -363,8 +363,8 @@ fn meta_test_deep_pretty_print_registry() {
pkg!((\"baz\", \"1.0.1\")),\
pkg!((\"cat\", \"1.0.2\") => [dep_req_kind(\"other\", \"^2\", Kind::Build, false),]),\
pkg!((\"cat\", \"1.0.3\") => [dep_req_kind(\"other\", \"^2\", Kind::Development, false),]),\
pkg!((\"cat\", \"1.0.4\") => [dep_req_kind(\"other\", \"^2\", Kind::Build, true),]),\
pkg!((\"cat\", \"1.0.5\") => [dep_req_kind(\"other\", \"^2\", Kind::Development, true),]),\
pkg!((\"cat\", \"1.0.4\") => [dep_req_kind(\"other\", \"^2\", Kind::Build, false),]),\
pkg!((\"cat\", \"1.0.5\") => [dep_req_kind(\"other\", \"^2\", Kind::Development, false),]),\
pkg!((\"dep_req\", \"1.0.0\")),\
pkg!((\"dep_req\", \"2.0.0\")),]"
)
Expand Down

0 comments on commit f4aac94

Please sign in to comment.