Skip to content

Commit 3eb2542

Browse files
ranfdevsdroege
authored andcommitted
Remove construct_cell, too experimental
The API hasn't received enough thought. It's isn't ready for release. If useful this can be added later.
1 parent cc1f50b commit 3eb2542

File tree

3 files changed

+0
-165
lines changed

3 files changed

+0
-165
lines changed

glib-macros/tests/properties.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ fn props() {
77
mod foo {
88
use glib::prelude::*;
99
use glib::subclass::prelude::*;
10-
use glib::{ConstructCell, ConstructRefCell};
1110
use glib_macros::Properties;
1211
use std::cell::Cell;
1312
use std::cell::RefCell;
@@ -86,10 +85,6 @@ fn props() {
8685
once_cell: OnceCell<u8>,
8786
#[property(get, set)]
8887
cell: Cell<u8>,
89-
#[property(get, set)]
90-
construct_cell: ConstructCell<u8>,
91-
#[property(get, set)]
92-
construct_ref_cell: ConstructRefCell<u8>,
9388
}
9489

9590
impl ObjectImpl for Foo {
@@ -102,10 +97,6 @@ fn props() {
10297
fn property(&self, id: usize, _pspec: &ParamSpec) -> Value {
10398
Self::derived_property(self, id, _pspec)
10499
}
105-
fn constructed(&self) {
106-
self.construct_cell.replace(Some(1));
107-
self.construct_ref_cell.replace(Some(2));
108-
}
109100
}
110101

111102
#[glib::object_subclass]
@@ -222,13 +213,6 @@ fn props() {
222213
// member of struct field
223214
let author_nick = myfoo.author_nick();
224215
assert_eq!(author_nick, myfoo.property::<String>("author-nick"));
225-
226-
// construct_cell
227-
let n = myfoo.construct_cell();
228-
assert_eq!(n, myfoo.property::<u8>("construct-cell"));
229-
230-
let n = myfoo.construct_ref_cell();
231-
assert_eq!(n, myfoo.property::<u8>("construct-ref-cell"));
232216
}
233217

234218
// setters

glib/src/construct_cell.rs

Lines changed: 0 additions & 147 deletions
This file was deleted.

glib/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ mod byte_array;
127127
mod bytes;
128128
pub mod char;
129129
pub use self::char::*;
130-
mod construct_cell;
131-
pub use construct_cell::*;
132130
mod checksum;
133131
pub mod closure;
134132
mod convert;

0 commit comments

Comments
 (0)