Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate glib::object::Object::new instead of unsafe code #304

Merged
merged 4 commits into from
Dec 30, 2022

Conversation

msrd0
Copy link
Contributor

@msrd0 msrd0 commented Dec 30, 2022

This removes all unsafe code that was previously being generated by the proc macro. Also simplifies the code a bit.

@antoyo
Copy link
Owner

antoyo commented Dec 30, 2022

Thanks for your contribution!

The CI now fails with some clippy warnings.

Can you please add the following at the crate root to silence those warnings?

#![allow(clippy::uninlined-format-args)]

@msrd0 msrd0 force-pushed the no-unsafe-in-derive branch from 7d1068a to a0e6791 Compare December 30, 2022 19:33
@msrd0
Copy link
Contributor Author

msrd0 commented Dec 30, 2022

Should be fixed now

@antoyo
Copy link
Owner

antoyo commented Dec 30, 2022

I guess you'll need to add allow(unknown_lints) as well since it seems the clippy lint is not on stable yet.

@msrd0
Copy link
Contributor Author

msrd0 commented Dec 30, 2022

It looks like that didn't help. Maybe it would be sufficient to run clippy only on one Rust version?

@antoyo
Copy link
Owner

antoyo commented Dec 30, 2022

It seems like unknown_lints should come before the unknown lint in the list.

@msrd0
Copy link
Contributor Author

msrd0 commented Dec 30, 2022

Interesting, I didn't know the order had any effect

@antoyo antoyo merged commit 2ff5022 into antoyo:master Dec 30, 2022
@antoyo
Copy link
Owner

antoyo commented Dec 30, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants