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

Correctly generate glib::Error import #863

Merged
merged 1 commit into from
Oct 23, 2019

Conversation

GuillaumeGomez
Copy link
Member

fn strip_crate_name<'a>(&self, name: &'a str) -> Option<&'a str> {
fn strip_crate_name<'a>(&self, mut name: &'a str) -> Option<&'a str> {
if name == "Error" && self.crate_name != "glib" {
name = "glib::Error";
Copy link
Member

Choose a reason for hiding this comment

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

This does not seem correct. Why does it even end up here without the glib:: prefix?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is actually an excellent question. Since it's part of manual imports everytime, it *should* not be needed. This fix is therefore incomplete. I need to find what's going on.

@GuillaumeGomez
Copy link
Member Author

I now extended the fix. Way cleaner, better, faster, etc. :)

@GuillaumeGomez
Copy link
Member Author

And now with fixed formatting.

@GuillaumeGomez
Copy link
Member Author

ping @EPashkin @sdroege :)

@EPashkin
Copy link
Member

@GuillaumeGomez Thanks, I will wait for @sdroege just in case

@sdroege
Copy link
Member

sdroege commented Oct 23, 2019

👍

@EPashkin EPashkin merged commit 2bb6380 into gtk-rs:master Oct 23, 2019
@GuillaumeGomez GuillaumeGomez deleted the correct-error-import branch October 23, 2019 21:24
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.

glib::Error gets used as use Error instead of use glib::Error when in the manual array
3 participants