fixes for new release

This commit is contained in:
2021-08-28 10:24:35 +02:00
parent 31a9d767ae
commit c52147ad4d
8 changed files with 128 additions and 66 deletions
+10
View File
@@ -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,
}
}
}