Skip to content

Commit

Permalink
Eliminate a useless warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed Aug 24, 2024
1 parent 7d6ffd8 commit e702666
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fieldx_derive/src/codegen/nonsync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,16 @@ impl<'f> FXCGenContextual<'f> for FXCodeGen<'f> {
]
}
else if fctx.is_inner_mut() {
let (deref, ty) = if fctx.is_clone() || fctx.is_copy() {
let (deref, ty_tok) = if fctx.is_clone() || fctx.is_copy() {
(quote![*], quote![#ty])
}
else {
(quote![], quote![::std::cell::Ref<'fx_reader_lifetime, #ty>])
};
quote_spanned![span=>
#attributes_fn
#vis_tok fn #accessor_name<'fx_reader_lifetime>(&'fx_reader_lifetime self) -> #ty {
#vis_tok fn #accessor_name<'fx_reader_lifetime>(&'fx_reader_lifetime self) -> #ty_tok {
#[allow(unused_parens)]
(#deref self.#ident.borrow()) #meth
}
]
Expand Down

0 comments on commit e702666

Please sign in to comment.