-
Notifications
You must be signed in to change notification settings - Fork 743
TemplateParameters' methods should just return a Vec, not an Option<Vec> #960
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
Comments
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the If you intend to work on this issue, then add |
Ya I'll take this @highfive: assign me |
Hey @hgallagher1993! Thanks for your interest in working on this issue. It's now assigned to you! |
@hgallagher1993 let me know if you have any questions! |
@hgallagher1993 making any progress here? Anything I can help with? |
Yes I have been making progress, There's only a couple compilation errors and then the comments so I should have a pull request in the next day or 2 |
@fitzgen Just as an update this is finished but I'm going to a wedding for the weekend so I'll just make the pull request when I'm back at my laptop on Monday or Tuesday |
Enjoy the wedding :) |
The Option<T> returned in this trait was removed to return Vec. Fixes rust-lang#960.
The Option<T> returned in this trait was removed to return Vec. Fixes rust-lang#960.
The Option<T> returned in this trait was removed to return Vec. Fixes rust-lang#960.
Hello, this issue is still open, no? I can try to solve this, if yes. |
There's #1245, which should be pretty close to be landable. |
Oh, I confounded this PR with the other. Hope it goes alright with this PR! |
The Option<T> returned in this trait was removed to return Vec. Fixes rust-lang#960.
I thought that the
Option
would be useful, but in practice we do pretty much ignore that it is an option and do things likeparams.unwrap_or(vec![])
. And then in other places when the result isSome
we assume that the containedVec
is not empty, when that isn't always the case.It will be much simpler to just return a
Vec
that is either empty or not.And also
usize
instead ofOption<usize>
fornum_self_template_params
.The trait's comment will need to be updated as well.
https://github.com/rust-lang-nursery/rust-bindgen/blob/cd41e5cfe26555af574e81b6aa3bed2b84a18000/src/ir/template.rs#L102
The text was updated successfully, but these errors were encountered: