Skip to content

Commit 6d59da5

Browse files
committed
remove useless from_glib in min_max macro
1 parent 78607e5 commit 6d59da5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

glib/src/param_spec.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,19 +357,19 @@ macro_rules! define_param_spec_default {
357357
}
358358

359359
macro_rules! define_param_spec_min_max {
360-
($rust_type:ident, $value_type:ty, $from_glib:expr) => {
360+
($rust_type:ident, $value_type:ty) => {
361361
impl $rust_type {
362362
pub fn minimum(&self) -> $value_type {
363363
unsafe {
364364
let ptr = self.to_glib_none().0;
365-
$from_glib((*ptr).minimum)
365+
(*ptr).minimum
366366
}
367367
}
368368

369369
pub fn maximum(&self) -> $value_type {
370370
unsafe {
371371
let ptr = self.to_glib_none().0;
372-
$from_glib((*ptr).maximum)
372+
(*ptr).maximum
373373
}
374374
}
375375
}
@@ -380,7 +380,7 @@ macro_rules! define_param_spec_numeric {
380380
($rust_type:ident, $ffi_type:path, $value_type:ty, $rust_type_offset:expr, $ffi_fun:ident, $alias:literal) => {
381381
define_param_spec!($rust_type, $ffi_type, $rust_type_offset);
382382
define_param_spec_default!($rust_type, $value_type, |x| x);
383-
define_param_spec_min_max!($rust_type, $value_type, |x| x);
383+
define_param_spec_min_max!($rust_type, $value_type);
384384

385385
impl $rust_type {
386386
#[allow(clippy::new_ret_no_self)]

0 commit comments

Comments
 (0)