Skip to content

Commit

Permalink
glib-macros: qualify to_value
Browse files Browse the repository at this point in the history
This prevent having to import ToValue or the prelude
  • Loading branch information
SeaDve committed Mar 6, 2023
1 parent 27c7cd3 commit b8ed5b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions glib-macros/src/value_delegate_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub fn impl_value_delegate(input: ValueDelegateInput) -> syn::Result<proc_macro:
impl #crate_ident::value::ToValueOptional for #ident {
fn to_value_optional(s: Option<&Self>) -> #crate_ident::value::Value {
if let Some(this) = s {
Some(&#delegate_value).to_value()
#crate_ident::value::ToValue::to_value(&Some(&#delegate_value))
} else {
#crate_ident::value::ToValueOptional::to_value_optional(None::<&#delegated_ty>)
}
Expand All @@ -155,11 +155,11 @@ pub fn impl_value_delegate(input: ValueDelegateInput) -> syn::Result<proc_macro:
impl #crate_ident::value::ToValue for #ident {
fn to_value(&self) -> #crate_ident::value::Value {
let this = self;
#delegate_value.to_value()
#crate_ident::value::ToValue::to_value(&#delegate_value)
}
fn value_type(&self) -> #crate_ident::types::Type {
let this = self;
#delegate_value.value_type()
#crate_ident::value::ToValue::value_type(&#delegate_value)
}
}

Expand Down

0 comments on commit b8ed5b5

Please sign in to comment.