gtk-rs-core icon indicating copy to clipboard operation
gtk-rs-core copied to clipboard

`glib::Object::new()` should panic on failure and new `try_new()` variant needed

Open sdroege opened this issue 2 years ago • 5 comments

This would be consistent with how set_property() and similar API work nowadays. 99% of all cases are just unwrapping on failure anyway as it's a programmer error and not a case that can be handled in a reasonable way.

sdroege avatar Sep 15 '22 11:09 sdroege

I'll try to implement this in the next few hours...

categulario avatar Sep 26 '22 23:09 categulario

Ok, so far so good. Should this change span to gio::Initable? or should I stop there...

categulario avatar Sep 26 '22 23:09 categulario

I should've read the linked messages here... well...

categulario avatar Sep 27 '22 00:09 categulario

Sorry, I should've added a comment into this issue here. If you're looking for a similar change to work on, https://github.com/gtk-rs/gtk-rs-core/issues/773 has nobody to work on currently.

sdroege avatar Sep 28 '22 07:09 sdroege

Or also feel free to continue my PR. This requires further changes everywhere (and the removal of the try variants).

sdroege avatar Sep 28 '22 10:09 sdroege