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

@GuillaumeGomez GuillaumeGomez commented Oct 23, 2019

Fixes #862.

cc @EPashkin @sdroege @Ekleog

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

@sdroege sdroege Oct 23, 2019

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

@GuillaumeGomez GuillaumeGomez Oct 23, 2019

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 GuillaumeGomez force-pushed the correct-error-import branch from 0a78a3c to 1321e31 Oct 23, 2019
@GuillaumeGomez
Copy link
Member Author

@GuillaumeGomez GuillaumeGomez commented Oct 23, 2019

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

@GuillaumeGomez GuillaumeGomez force-pushed the correct-error-import branch from 1321e31 to 03f218f Oct 23, 2019
@GuillaumeGomez
Copy link
Member Author

@GuillaumeGomez GuillaumeGomez commented Oct 23, 2019

And now with fixed formatting.

@GuillaumeGomez
Copy link
Member Author

@GuillaumeGomez GuillaumeGomez commented Oct 23, 2019

@EPashkin
Copy link
Member

@EPashkin EPashkin commented Oct 23, 2019

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

@sdroege
Copy link
Member

@sdroege sdroege commented Oct 23, 2019

👍

@EPashkin EPashkin merged commit 2bb6380 into gtk-rs:master Oct 23, 2019
2 checks passed
@GuillaumeGomez GuillaumeGomez deleted the correct-error-import branch Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants