Skip to content

Commit c76d8e7

Browse files
committed
chore(rust): update Rust edition to 2024.
1 parent 9b21279 commit c76d8e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+291
-289
lines changed

collector/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "collect-data"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

collector/src/binance/http.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ use std::{
77
use anyhow::Error;
88
use chrono::{DateTime, Utc};
99
use futures_util::{SinkExt, StreamExt};
10-
use tokio::sync::mpsc::{unbounded_channel, UnboundedSender};
10+
use tokio::sync::mpsc::{UnboundedSender, unbounded_channel};
1111
use tokio_tungstenite::{
1212
connect_async,
13-
tungstenite::{client::IntoClientRequest, Bytes, Message, Utf8Bytes},
13+
tungstenite::{Bytes, Message, Utf8Bytes, client::IntoClientRequest},
1414
};
1515
use tracing::{error, warn};
1616

collector/src/binance/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::collections::HashMap;
44

55
use chrono::{DateTime, Utc};
66
pub use http::{fetch_depth_snapshot, keep_connection};
7-
use tokio::sync::mpsc::{unbounded_channel, UnboundedSender};
7+
use tokio::sync::mpsc::{UnboundedSender, unbounded_channel};
88
use tokio_tungstenite::tungstenite::Utf8Bytes;
99
use tracing::{error, warn};
1010

collector/src/binancefuturescm/http.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ use std::{
77
use anyhow::Error;
88
use chrono::{DateTime, Utc};
99
use futures_util::{SinkExt, StreamExt};
10-
use tokio::sync::mpsc::{unbounded_channel, UnboundedSender};
10+
use tokio::sync::mpsc::{UnboundedSender, unbounded_channel};
1111
use tokio_tungstenite::{
1212
connect_async,
13-
tungstenite::{client::IntoClientRequest, Bytes, Message, Utf8Bytes},
13+
tungstenite::{Bytes, Message, Utf8Bytes, client::IntoClientRequest},
1414
};
1515
use tracing::{error, warn};
1616

collector/src/binancefuturescm/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::collections::HashMap;
44

55
use chrono::{DateTime, Utc};
66
pub use http::{fetch_depth_snapshot, keep_connection};
7-
use tokio::sync::mpsc::{unbounded_channel, UnboundedSender};
7+
use tokio::sync::mpsc::{UnboundedSender, unbounded_channel};
88
use tokio_tungstenite::tungstenite::Utf8Bytes;
99
use tracing::{error, warn};
1010

collector/src/binancefuturesum/http.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ use std::{
77
use anyhow::Error;
88
use chrono::{DateTime, Utc};
99
use futures_util::{SinkExt, StreamExt};
10-
use tokio::sync::mpsc::{unbounded_channel, UnboundedSender};
10+
use tokio::sync::mpsc::{UnboundedSender, unbounded_channel};
1111
use tokio_tungstenite::{
1212
connect_async,
13-
tungstenite::{client::IntoClientRequest, Bytes, Message, Utf8Bytes},
13+
tungstenite::{Bytes, Message, Utf8Bytes, client::IntoClientRequest},
1414
};
1515
use tracing::{error, warn};
1616

collector/src/binancefuturesum/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::collections::HashMap;
44

55
use chrono::{DateTime, Utc};
66
pub use http::{fetch_depth_snapshot, keep_connection};
7-
use tokio::sync::mpsc::{unbounded_channel, UnboundedSender};
7+
use tokio::sync::mpsc::{UnboundedSender, unbounded_channel};
88
use tokio_tungstenite::tungstenite::Utf8Bytes;
99
use tracing::{error, warn};
1010

collector/src/bybit/http.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ use chrono::{DateTime, Utc};
99
use futures_util::{SinkExt, StreamExt};
1010
use tokio::{
1111
select,
12-
sync::mpsc::{unbounded_channel, UnboundedSender},
12+
sync::mpsc::{UnboundedSender, unbounded_channel},
1313
};
1414
use tokio_tungstenite::{
1515
connect_async,
16-
tungstenite::{client::IntoClientRequest, Bytes, Message, Utf8Bytes},
16+
tungstenite::{Bytes, Message, Utf8Bytes, client::IntoClientRequest},
1717
};
1818
use tracing::{error, warn};
1919

collector/src/bybit/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use chrono::{DateTime, Utc};
2-
use tokio::sync::mpsc::{unbounded_channel, UnboundedSender};
2+
use tokio::sync::mpsc::{UnboundedSender, unbounded_channel};
33
use tokio_tungstenite::tungstenite::Utf8Bytes;
44
use tracing::error;
55

collector/src/file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use std::{
2-
collections::{hash_map::Entry, HashMap},
2+
collections::{HashMap, hash_map::Entry},
33
fs::File,
44
io,
55
io::Write,
66
};
77

88
use chrono::{DateTime, NaiveDate, Utc};
9-
use flate2::{write::GzEncoder, Compression};
9+
use flate2::{Compression, write::GzEncoder};
1010
use tracing::info;
1111

1212
pub struct RotatingFile {

0 commit comments

Comments
 (0)