Skip to content

Less painful parameter array syntax #10

Closed
@sfackler

Description

@sfackler

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>]);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions