Skip to content

Less painful parameter array syntax #10

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

Closed
sfackler opened this issue Aug 26, 2013 · 1 comment
Closed

Less painful parameter array syntax #10

sfackler opened this issue Aug 26, 2013 · 1 comment

Comments

@sfackler
Copy link
Owner

Having to do something like

stmt.query([&10 as &ToSql, & &"foo" as &ToSql, &None::<uint> as &ToSql]);

Is a huge pain. This problem will be less painful once Rust supports cross-crate macro exports, and we can write a params! macro like

stmt.query(params!(&10, & &"foo", &None::<uint>))

Hopefully Rust will eventually implicitly cast and auto-borrow to trait objects so the syntax will end up as

stmt.query([10, &"foo", None::<uint>]);
@sfackler
Copy link
Owner Author

sfackler commented Jul 3, 2014

Fixed by rust-lang/rust#15069!

@sfackler sfackler closed this as completed Jul 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant