Created
November 15, 2019 17:01
-
-
Save sfackler/f201b057d858f330bb02541171d3b044 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let client = connect("user=postgres").await; | |
let f = async move { | |
let params: Vec<Box<dyn ToSql + Sync + Send>> = vec![Box::new(1i32)]; | |
client.query_raw("SELECT $1::INT4", params.iter().map(|p| &**p as _)).await.unwrap(); | |
}; | |
fn is_send<T: Send>(_: T) {} | |
is_send(f); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment