gtk-rs / gtk-rs-core

Rust bindings for GNOME libraries
https://gtk-rs.org/gtk-rs-core
MIT License
272 stars 104 forks source link

from_glib_ptr_borrow : Consider taking a *mut pointer to object #1373

Closed sophie-h closed 2 months ago

sophie-h commented 2 months ago

Since we usually use mut for GObjects, it would make sense to take a `const mutor a&mut`. The latter one is what I usually have in my code so far.

sdroege commented 2 months ago

Should ideally use a reference as that makes the lifetime tracking work better and makes it harder to use it wrong. Not sure why I didn't do that. I'll look into that again :)

sdroege commented 2 months ago

Can you try if https://github.com/gtk-rs/gtk-rs-core/pull/1375 makes usage easy for you?