Skip to content

Commit 280ff20

Browse files
committed
refactor: use Bytes::from_static() in tests/it/insert_formatted.rs
1 parent a0a6db0 commit 280ff20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/it/insert_formatted.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async fn insert() {
3939

4040
create_table(&client).await;
4141

42-
let bytes = Bytes::copy_from_slice(TAXI_DATA_TSV);
42+
let bytes = Bytes::from_static(TAXI_DATA_TSV);
4343

4444
let mut insert =
4545
client.insert_formatted_with("INSERT INTO nyc_taxi_trips_small FORMAT TabSeparated");
@@ -59,7 +59,7 @@ async fn insert_small_chunks() {
5959

6060
create_table(&client).await;
6161

62-
let mut bytes = Bytes::copy_from_slice(TAXI_DATA_TSV);
62+
let mut bytes = Bytes::from_static(TAXI_DATA_TSV);
6363

6464
let mut insert =
6565
client.insert_formatted_with("INSERT INTO nyc_taxi_trips_small FORMAT TabSeparated");
@@ -106,7 +106,7 @@ async fn insert_send_timeout() {
106106

107107
let client = Client::default().with_url(format!("http://{local_addr}"));
108108

109-
let bytes = Bytes::copy_from_slice(TAXI_DATA_TSV);
109+
let bytes = Bytes::from_static(TAXI_DATA_TSV);
110110

111111
let send_timeout = Duration::from_millis(100);
112112

@@ -148,7 +148,7 @@ async fn insert_end_timeout() {
148148

149149
let client = Client::default().with_url(format!("http://{local_addr}"));
150150

151-
let bytes = Bytes::copy_from_slice(TAXI_DATA_TSV);
151+
let bytes = Bytes::from_static(TAXI_DATA_TSV);
152152

153153
let end_timeout = Duration::from_millis(100);
154154

0 commit comments

Comments
 (0)