Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Make glib::value::GetError fields publics #515

Closed
fengalin opened this issue Aug 13, 2019 · 3 comments · Fixed by #517
Closed

Make glib::value::GetError fields publics #515

fengalin opened this issue Aug 13, 2019 · 3 comments · Fixed by #517

Comments

@fengalin
Copy link
Contributor

... so that we can read them outside of the module and we can build an error for use in assert_eq! expressions.

@sdroege
Copy link
Member

sdroege commented Aug 13, 2019

Or a constructor? Either way seems fine to me

@fengalin
Copy link
Contributor Author

Yeah, I'm not sure yet. We don't want users to change the fields values, but OTOH they might want to read the fields.

@fengalin
Copy link
Contributor Author

Of course adding a constructor is useful, there's no question about this. One argument in favour of setting the fields as public is that when we declare an Error based on an enum, the variants fields are public.

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

Successfully merging a pull request may close this issue.

2 participants