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

Make answer types truly generic #1

Open
phansch opened this issue Feb 23, 2020 · 0 comments
Open

Make answer types truly generic #1

phansch opened this issue Feb 23, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@phansch
Copy link
Owner

phansch commented Feb 23, 2020

The answer type is currently hardcoded to be f32:

// FIXME: This only works when all answers of type `Select` have the concrete
// type `f32`. Need to abstract over that as well.
questions.iter().for_each(|q: &Question<f32>| { map.insert(&q.name, q.ask()); } );

This prevents usage of 'select' answer types with choices of type other than f32.

@phansch phansch added the bug Something isn't working label Feb 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant