fixes for new release
This commit is contained in:
@@ -95,10 +95,20 @@ mod test {
|
||||
pub trait VisExt: Copy {
|
||||
/// Check if is private or direct
|
||||
fn is_private(self) -> bool;
|
||||
fn make_unlisted(self) -> Self;
|
||||
}
|
||||
|
||||
impl VisExt for Visibility {
|
||||
fn is_private(self) -> bool {
|
||||
self == Visibility::Direct || self == Visibility::Private
|
||||
}
|
||||
|
||||
fn make_unlisted(self) -> Self {
|
||||
match self {
|
||||
Visibility::Public => {
|
||||
Visibility::Unlisted
|
||||
}
|
||||
other => other,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user