mirror of
https://github.com/rust-lang/cargo
synced 2024-10-01 21:43:45 +00:00
Relax assertion
This commit is contained in:
parent
df4d2095ac
commit
2de44c47ce
|
@ -301,8 +301,10 @@ impl Dependency {
|
|||
|
||||
/// Sets whether the dependency is public.
|
||||
pub fn set_public(&mut self, public: bool) -> &mut Dependency {
|
||||
// Setting 'public' only makes sense for normal dependencies
|
||||
if !public {
|
||||
// Setting 'private' only makes sense for normal dependencies
|
||||
assert_eq!(self.kind(), Kind::Normal);
|
||||
}
|
||||
Rc::make_mut(&mut self.inner).public = public;
|
||||
self
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue