gtk-rs / gtk-rs-core

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

Update `clone!` and `closure!` macro to new syntax #1424

Closed sdroege closed 2 weeks ago

sdroege commented 1 month ago

This works correctly with rustfmt now, and thanks to using syn correctly also gives much better user experience with rust-analyzer.

Also the closure! macro now supports plain weak references too.

Fixes https://github.com/gtk-rs/gtk-rs-core/issues/1394

sdroege commented 1 month ago

I'll also update the closure macro in a bit once this is cleaned up (and re-use part of the code here I guess).

sdroege commented 1 month ago

closure macro is also covered now

sdroege commented 1 month ago

@GuillaumeGomez Updated everything, thanks for the review :)

sdroege commented 1 month ago

Tests that cover all error cases of both macros are added now

sdroege commented 2 weeks ago

Updated everything accordingly and will merge once the CI is happy. Everything else can happen on top of this