Skip to content

Commit af84de3

Browse files
committed
make it work after rebase
1 parent 1efff4e commit af84de3

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

glib-macros/src/properties.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,6 @@ fn expand_property_fn(props: &[PropDesc]) -> TokenStream2 {
388388
quote!(
389389
fn derived_property<'a>(
390390
&self,
391-
_obj: &Self::Type,
392391
id: usize,
393392
pspec: &'a #crate_ident::ParamSpec
394393
) -> Result<#crate_ident::Value, #crate_ident::subclass::object::MissingPropertyHandler<'a>> {
@@ -448,7 +447,6 @@ fn expand_set_property_fn(props: &[PropDesc]) -> TokenStream2 {
448447
});
449448
quote!(
450449
fn derived_set_property<'a>(&self,
451-
_obj: &Self::Type,
452450
id: usize,
453451
value: &#crate_ident::Value,
454452
pspec: &'a #crate_ident::ParamSpec

glib-macros/tests/properties.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,16 @@ fn props() {
103103
}
104104
fn set_property(
105105
&self,
106-
_obj: &Self::Type,
107106
_id: usize,
108107
_value: &Value,
109108
_pspec: &ParamSpec,
110109
) {
111-
Self::derived_set_property(self, _obj, _id, _value, _pspec).unwrap()
110+
Self::derived_set_property(self, _id, _value, _pspec).unwrap()
112111
}
113-
fn property(&self, _obj: &Self::Type, _id: usize, _pspec: &ParamSpec) -> Value {
114-
Self::derived_property(self, _obj, _id, _pspec).unwrap()
112+
fn property(&self, id: usize, _pspec: &ParamSpec) -> Value {
113+
Self::derived_property(self, id, _pspec).unwrap()
115114
}
116-
fn constructed(&self, _obj: &Self::Type) {
115+
fn constructed(&self) {
117116
self.construct_cell.replace(Some(1));
118117
self.construct_ref_cell.replace(Some(2));
119118
}
@@ -143,7 +142,7 @@ fn props() {
143142
}
144143
}
145144

146-
let myfoo: foo::Foo = glib::object::Object::new(&[]).unwrap();
145+
let myfoo: foo::Foo = glib::object::Object::new(&[]);
147146

148147
// Read bar
149148
let bar: String = myfoo.property("bar");

glib/src/subclass/object.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ pub trait DerivedObjectProperties: ObjectSubclass {
165165
/// Similar to [`ObjectImpl`](trait.ObjectImpl.html) but returns a `Result`.
166166
fn derived_set_property<'a>(
167167
&self,
168-
_obj: &Self::Type,
169168
_id: usize,
170169
_value: &Value,
171170
_pspec: &'a ParamSpec,
@@ -177,7 +176,6 @@ pub trait DerivedObjectProperties: ObjectSubclass {
177176
/// Similar to [`ObjectImpl`](trait.ObjectImpl.html) but returns a `Result`.
178177
fn derived_property<'a>(
179178
&self,
180-
_obj: &Self::Type,
181179
_id: usize,
182180
_pspec: &'a ParamSpec,
183181
) -> Result<Value, MissingPropertyHandler<'a>> {

0 commit comments

Comments
 (0)