Skip to content

Commit

Permalink
cleaned code
Browse files Browse the repository at this point in the history
  • Loading branch information
hmoog committed Nov 14, 2024
1 parent c109579 commit 5a8fb32
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ impl Compatibility {
datatype_layout!("removed variant {tag} from enum {name}");
break;
};

if new_variant.name != old_variant.name {
// TODO: Variant renamed. This is a stricter definition than required.
// We could in principle choose that changing the name (but not position or
Expand Down Expand Up @@ -273,12 +272,12 @@ impl Compatibility {

// Check visibility compatibility
match (old_func.visibility, new_func.visibility) {
(Visibility::Public, Visibility::Private | Visibility::Friend) => {
datatype_and_function_linking!("downgraded visibility of public function {name}");
},
(Visibility::Friend, Visibility::Private) => {
friend_linking!("downgraded visibility of friend function {name}");
},
(Visibility::Public, Visibility::Private | Visibility::Friend) => datatype_and_function_linking!(
"downgraded visibility of public function {name}"
),
(Visibility::Friend, Visibility::Private) => friend_linking!(
"downgraded visibility of friend function {name}"
),
_ => (),
}

Expand Down

0 comments on commit 5a8fb32

Please sign in to comment.