Skip to content

Commit

Permalink
[fixup] reduce refs
Browse files Browse the repository at this point in the history
  • Loading branch information
shepmaster committed Jul 20, 2021
1 parent 988588a commit 15cc66b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions snafu-derive/src/lib.rs
Expand Up @@ -1247,9 +1247,9 @@ impl EnumInfo {
let error_impl = ErrorImpl(&self);
let error_compat_impl = ErrorCompatImpl(&self);

let context = match self.module {
let context = match &self.module {
None => quote! { #context_selectors },
Some(ref module_name) => {
Some(module_name) => {
use crate::shared::ContextModule;

let context_module = ContextModule {
Expand Down Expand Up @@ -1563,11 +1563,11 @@ impl NamedStructInfo {

let pub_visibility = pub_visibility();
let selector_visibility = match (visibility, module) {
(Some(ref v), _) => Some(&**v),
(Some(v), _) => Some(&**v),
(None, Some(_)) => {
// Default to pub visibility since private context selectors
// wouldn't be accessible outside the module.
Some(&pub_visibility as &dyn quote::ToTokens)
Some(&pub_visibility as _)
}
(None, None) => None,
};
Expand Down

0 comments on commit 15cc66b

Please sign in to comment.