Skip to content

Commit 8a5f7f5

Browse files
committed
fmt
1 parent 45cc979 commit 8a5f7f5

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

driver/src/rest_api.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,16 @@ impl<'o> RestAPIConnection {
234234
("record_delimiter", "\n"),
235235
("skip_header", "0"),
236236
]
237-
.into_iter()
238-
.collect()
237+
.into_iter()
238+
.collect()
239239
}
240240

241241
fn default_copy_options() -> BTreeMap<&'o str, &'o str> {
242242
vec![("purge", "true")].into_iter().collect()
243243
}
244244
}
245245

246-
type PageFut = Pin<Box<dyn Future<Output=Result<QueryResponse>> + Send>>;
246+
type PageFut = Pin<Box<dyn Future<Output = Result<QueryResponse>> + Send>>;
247247

248248
pub struct RestAPIRows {
249249
client: APIClient,

driver/tests/driver/transaction.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,20 @@ use databend_driver::Client;
1616

1717
use crate::common::DEFAULT_DSN;
1818

19-
2019
#[tokio::test]
2120
async fn test_commit() {
2221
let dsn = option_env!("TEST_DATABEND_DSN").unwrap_or(DEFAULT_DSN);
2322
let client = Client::new(dsn.to_string());
2423
let conn = client.get_conn().await.unwrap();
2524

26-
conn.exec("CREATE OR REPLACE TABLE t(c int);").await.unwrap();
25+
conn.exec("CREATE OR REPLACE TABLE t(c int);")
26+
.await
27+
.unwrap();
2728
conn.begin().await.unwrap();
2829
conn.exec("INSERT INTO t VALUES(1);").await.unwrap();
2930
let row = conn.query_row("SELECT * FROM t").await.unwrap();
3031
let row = row.unwrap();
31-
let (val, ): (i32, ) = row.try_into().unwrap();
32+
let (val,): (i32,) = row.try_into().unwrap();
3233
assert_eq!(val, 1);
3334
conn.commit().await.unwrap();
3435
}
@@ -39,17 +40,18 @@ async fn test_rollback() {
3940
let client = Client::new(dsn.to_string());
4041
let conn = client.get_conn().await.unwrap();
4142

42-
conn.exec("CREATE OR REPLACE TABLE t(c int);").await.unwrap();
43+
conn.exec("CREATE OR REPLACE TABLE t(c int);")
44+
.await
45+
.unwrap();
4346
conn.begin().await.unwrap();
4447
conn.exec("INSERT INTO t VALUES(1);").await.unwrap();
4548
let row = conn.query_row("SELECT * FROM t").await.unwrap();
4649
let row = row.unwrap();
47-
let (val, ): (i32, ) = row.try_into().unwrap();
50+
let (val,): (i32,) = row.try_into().unwrap();
4851
assert_eq!(val, 1);
4952
conn.rollback().await.unwrap();
5053
let row = conn.query_row("SELECT * FROM t").await.unwrap();
5154
let row = row.unwrap();
52-
let (val, ): (Option<i32>, ) = row.try_into().unwrap();
55+
let (val,): (Option<i32>,) = row.try_into().unwrap();
5356
assert_eq!(val, None)
5457
}
55-

0 commit comments

Comments
 (0)