more clippy
This commit is contained in:
@@ -16,12 +16,12 @@ where
|
||||
{
|
||||
for &(ref val, ref repr) in checks.iter() {
|
||||
let stmt = conn
|
||||
.prepare(&*format!("SELECT {}::{}", *repr, sql_type))
|
||||
.prepare(&format!("SELECT {}::{}", *repr, sql_type))
|
||||
.unwrap();
|
||||
let result = conn.query_one(&stmt, &[]).unwrap().get(0);
|
||||
assert_eq!(val, &result);
|
||||
|
||||
let stmt = conn.prepare(&*format!("SELECT $1::{}", sql_type)).unwrap();
|
||||
let stmt = conn.prepare(&format!("SELECT $1::{}", sql_type)).unwrap();
|
||||
let result = conn.query_one(&stmt, &[val]).unwrap().get(0);
|
||||
assert_eq!(val, &result);
|
||||
}
|
||||
@@ -40,12 +40,12 @@ pub fn test_type_asymmetric<T, F, S, C>(
|
||||
{
|
||||
for &(ref val, ref repr) in checks.iter() {
|
||||
let stmt = conn
|
||||
.prepare(&*format!("SELECT {}::{}", *repr, sql_type))
|
||||
.prepare(&format!("SELECT {}::{}", *repr, sql_type))
|
||||
.unwrap();
|
||||
let result: F = conn.query_one(&stmt, &[]).unwrap().get(0);
|
||||
assert!(cmp(val, &result));
|
||||
|
||||
let stmt = conn.prepare(&*format!("SELECT $1::{}", sql_type)).unwrap();
|
||||
let stmt = conn.prepare(&format!("SELECT $1::{}", sql_type)).unwrap();
|
||||
let result: F = conn.query_one(&stmt, &[val]).unwrap().get(0);
|
||||
assert!(cmp(val, &result));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user