We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 490c485 commit a379fbbCopy full SHA for a379fbb
tokio-postgres/src/to_statement.rs
@@ -1,5 +1,7 @@
1
-use crate::to_statement::private::{Sealed, ToStatementType};
2
-use crate::Statement;
+use crate::{
+ to_statement::private::{Sealed, ToStatementType},
3
+ Statement,
4
+};
5
6
mod private {
7
use crate::{Client, Error, Statement};
@@ -47,10 +49,11 @@ impl ToStatement for str {
47
49
}
48
50
51
impl Sealed for str {}
52
+impl Sealed for &str {}
53
-impl ToStatement for String {
54
+impl<T: Sealed + AsRef<str>> ToStatement for T {
55
fn __convert(&self) -> ToStatementType<'_> {
- ToStatementType::Query(self)
56
+ ToStatementType::Query(self.as_ref())
57
58
59
0 commit comments