Relax assertion

This commit is contained in:
Aaron Hill 2019-04-25 23:24:32 -04:00
parent df4d2095ac
commit 2de44c47ce
No known key found for this signature in database
GPG key ID: B4087E510E98B164

View file

@ -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
assert_eq!(self.kind(), Kind::Normal);
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
}