Use std::u32::{MIN,MAX}

parent fd56032a
......@@ -543,7 +543,7 @@ impl<'ast> Ty<'ast> {
pub fn to_gparam_spec_min_max_default(&self) -> TokenStream {
match *self {
Ty::Unit => unreachable!("there is no g_param_spec_*() for the Unit type"),
Ty::Char(_) => quote! { u32::MIN, u32::MAX, 0 }, // <char as ToGlib>::GlibType = u32
Ty::Char(_) => quote! { std::u32::MIN, std::u32::MAX, 0 }, // <char as ToGlib>::GlibType = u32
// g_param_spec_bool() takes no min/max, just a default
Ty::Bool(_) => quote! { glib_ffi::GFALSE },
......@@ -558,7 +558,7 @@ impl<'ast> Ty<'ast> {
"isize" => unimplemented!(),
"u16" => unimplemented!("should we promote u16 to u32?"),
"u32" => quote! { u32::MIN, u32::MAX, 0 },
"u32" => quote! { std::u32::MIN, std::u32::MAX, 0 },
"u64" => quote! { u64::MIN, u64::MAX, 0 },
"usize" => unimplemented!(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment