Skip to content

Commit c5feb25

Browse files
committed
param_spec: add ParamSpecEnumBuilder::default_value()
Make the API more symetric and may be useful if builder has been created with builder().
1 parent f340e96 commit c5feb25

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

glib/src/param_spec.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,11 @@ impl<'a, T: StaticType + FromGlib<i32> + IntoGlib<GlibType = i32>> ParamSpecEnum
10861086
}
10871087
}
10881088

1089+
pub fn default_value(mut self, default: T) -> Self {
1090+
self.default_value = default;
1091+
self
1092+
}
1093+
10891094
#[must_use]
10901095
pub fn build(self) -> ParamSpec {
10911096
unsafe {

0 commit comments

Comments
 (0)