From f6b84371f87bd1dfe9acc407269cbeeb38d16c56 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Mon, 8 May 2023 12:15:59 +0200 Subject: [PATCH] codegen: Use ObjectExt trait directly As it is exposed by glib prelude nowadays --- src/codegen/property_body.rs | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/codegen/property_body.rs b/src/codegen/property_body.rs index 97ec64f26..3a58741bd 100644 --- a/src/codegen/property_body.rs +++ b/src/codegen/property_body.rs @@ -1,8 +1,4 @@ -use crate::{ - chunk::Chunk, - env::Env, - nameutil::{use_glib_type, use_gtk_type}, -}; +use crate::{chunk::Chunk, env::Env, nameutil::use_gtk_type}; pub struct Builder<'a> { name: String, @@ -95,10 +91,8 @@ impl<'a> Builder<'a> { }; vec![Chunk::Custom(format!( - "{}::property({}, \"{}\")", - use_glib_type(self.env, "ObjectExt"), - self_, - self.name + "ObjectExt::property({}, \"{}\")", + self_, self.name ))] } } @@ -126,11 +120,8 @@ impl<'a> Builder<'a> { }; vec![Chunk::Custom(format!( - "{}::set_property({},\"{}\", {})", - use_glib_type(self.env, "ObjectExt"), - self_, - self.name, - self.var_name + "ObjectExt::set_property({},\"{}\", {})", + self_, self.name, self.var_name ))] } }