Skip to content

Use rust constants and rust types in bindgen#160

Merged
CGMossa merged 3 commits intomasterfrom
rust_native_consts_and_types
Apr 27, 2023
Merged

Use rust constants and rust types in bindgen#160
CGMossa merged 3 commits intomasterfrom
rust_native_consts_and_types

Conversation

@CGMossa
Copy link
Member

@CGMossa CGMossa commented Apr 15, 2023

In continuing the effort to clean-up and smooth out libR-sys, I have found that clippy complains about these constants, and we can replace c-types with rust types by this setting.

This will need to be checked more thoroughly with extendr though.

CGMossa added 2 commits April 15, 2023 19:02
bindgen.
This is a clippy-complaint as well.
@CGMossa
Copy link
Member Author

CGMossa commented Apr 15, 2023

This is also blocked by #157

@CGMossa
Copy link
Member Author

CGMossa commented Apr 15, 2023

/bindings

@yutannihilation
Copy link
Contributor

Thanks for catching. I think we can just block them. Are there any good reason to re-export these constants that are already available via std?

@CGMossa
Copy link
Member Author

CGMossa commented Apr 18, 2023

Maybe extendr uses the rust name?
This yields documentation through the rust version atleast.

@yutannihilation
Copy link
Contributor

Maybe extendr uses the rust name?

I quickly searched M_ in the extendr's repository, but nothing is found. So, I think it's fine to remove.

@CGMossa
Copy link
Member Author

CGMossa commented Apr 18, 2023

That's even better. I'll make adjustments.

@CGMossa
Copy link
Member Author

CGMossa commented Apr 18, 2023

I've removed them.

@CGMossa
Copy link
Member Author

CGMossa commented Apr 18, 2023

We could consider .blocklist_item("^M_.*") just to clean up.

Copy link
Contributor

@yutannihilation yutannihilation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@CGMossa CGMossa merged commit 90c8d1e into master Apr 27, 2023
@yutannihilation yutannihilation mentioned this pull request May 22, 2023
@CGMossa CGMossa deleted the rust_native_consts_and_types branch October 6, 2023 07:39
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