We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 406c196 commit 39ef9c0Copy full SHA for 39ef9c0
glib-macros/src/properties.rs
@@ -566,9 +566,11 @@ fn expand_impl_getset_properties(props: &[PropDesc]) -> Vec<syn::ImplItemFn> {
566
567
let getter = p.get.is_some().then(|| {
568
let span = p.attrs_span;
569
- parse_quote_spanned!(span=> pub fn #ident(&self) -> <#ty as #crate_ident::Property>::Value {
570
- self.property::<<#ty as #crate_ident::Property>::Value>(#stripped_name)
571
- })
+ parse_quote_spanned!(span=>
+ #[must_use]
+ pub fn #ident(&self) -> <#ty as #crate_ident::Property>::Value {
572
+ self.property::<<#ty as #crate_ident::Property>::Value>(#stripped_name)
573
+ })
574
});
575
576
let setter = (p.set.is_some() && !p.is_construct_only).then(|| {
0 commit comments