Skip to content

Commit 198ca33

Browse files
authored
Merge pull request #1437 from Lorak-mmk/clippy-1.90
Fix Clippy 1.90 lints
2 parents 9e760bb + b3abe52 commit 198ca33

File tree

6 files changed

+12
-13
lines changed

6 files changed

+12
-13
lines changed

examples/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ edition = "2024"
33
name = "examples"
44
publish = false
55
version = "0.0.0"
6+
rust-version = "1.85"
67

78
[dev-dependencies]
89
anyhow = "1.0.33"

scylla-cql/src/serialize/row_tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ fn test_map_errors() {
225225
// etc. that usually pop up when generating code for empty structs.
226226
#[derive(SerializeRow)]
227227
#[scylla(crate = crate)]
228+
#[allow(dead_code)] // TODO: Change to expect after bumping MSRV to 1.90
228229
struct TestRowWithNoColumns {}
229230

230231
#[derive(SerializeRow, Debug, PartialEq, Eq, Default)]

scylla-macros/src/deserialize/row.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ impl DeserializeUnorderedGenerator<'_> {
631631
let field_idents = fields.iter().map(|f| f.ident.as_ref().unwrap());
632632
let nonskipped_field_names = fields
633633
.iter()
634-
.filter(|&f| (!f.skip))
634+
.filter(|&f| !f.skip)
635635
.map(|f| f.cql_name_literal());
636636

637637
let field_finalizers = fields.iter().map(|f| self.generate_finalize_field(f));

scylla-proxy/src/proxy.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ impl ProxyWorker {
10611061

10621062
async fn receiver_from_driver(
10631063
self,
1064-
mut read_half: (impl AsyncRead + Unpin),
1064+
mut read_half: impl AsyncRead + Unpin,
10651065
request_processor_tx: mpsc::UnboundedSender<RequestFrame>,
10661066
compression: CompressionReader,
10671067
) {
@@ -1096,7 +1096,7 @@ impl ProxyWorker {
10961096

10971097
async fn receiver_from_cluster(
10981098
self,
1099-
mut read_half: (impl AsyncRead + Unpin),
1099+
mut read_half: impl AsyncRead + Unpin,
11001100
response_processor_tx: mpsc::UnboundedSender<ResponseFrame>,
11011101
compression: CompressionReader,
11021102
) {
@@ -1133,7 +1133,7 @@ impl ProxyWorker {
11331133

11341134
async fn sender_to_driver(
11351135
self,
1136-
mut write_half: (impl AsyncWrite + Unpin),
1136+
mut write_half: impl AsyncWrite + Unpin,
11371137
mut responses_rx: mpsc::UnboundedReceiver<ResponseFrame>,
11381138
mut connection_close_notifier: ConnectionCloseNotifier,
11391139
mut terminate_notifier: TerminateNotifier,
@@ -1180,7 +1180,7 @@ impl ProxyWorker {
11801180

11811181
async fn sender_to_cluster(
11821182
self,
1183-
mut write_half: (impl AsyncWrite + Unpin),
1183+
mut write_half: impl AsyncWrite + Unpin,
11841184
mut requests_rx: mpsc::UnboundedReceiver<RequestFrame>,
11851185
mut connection_close_notifier: ConnectionCloseNotifier,
11861186
mut terminate_notifier: TerminateNotifier,

scylla/src/network/connection.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ impl Connection {
13171317
) -> Result<RemoteHandle<()>, std::io::Error> {
13181318
async fn spawn_router_and_get_handle(
13191319
config: HostConnectionConfig,
1320-
stream: (impl AsyncRead + AsyncWrite + Send + 'static),
1320+
stream: impl AsyncRead + AsyncWrite + Send + 'static,
13211321
receiver: mpsc::Receiver<Task>,
13221322
error_sender: tokio::sync::oneshot::Sender<ConnectionError>,
13231323
orphan_notification_receiver: mpsc::UnboundedReceiver<RequestId>,
@@ -1402,7 +1402,7 @@ impl Connection {
14021402

14031403
async fn router(
14041404
config: HostConnectionConfig,
1405-
stream: (impl AsyncRead + AsyncWrite),
1405+
stream: impl AsyncRead + AsyncWrite,
14061406
receiver: mpsc::Receiver<Task>,
14071407
error_sender: tokio::sync::oneshot::Sender<ConnectionError>,
14081408
orphan_notification_receiver: mpsc::UnboundedReceiver<RequestId>,
@@ -1468,7 +1468,7 @@ impl Connection {
14681468
}
14691469

14701470
async fn reader(
1471-
mut read_half: (impl AsyncRead + Unpin),
1471+
mut read_half: impl AsyncRead + Unpin,
14721472
handler_map: &StdMutex<ResponseHandlerMap>,
14731473
event_sender: Option<mpsc::Sender<Event>>,
14741474
compression: Option<Compression>,
@@ -1553,7 +1553,7 @@ impl Connection {
15531553
}
15541554

15551555
async fn writer(
1556-
mut write_half: (impl AsyncWrite + Unpin),
1556+
mut write_half: impl AsyncWrite + Unpin,
15571557
handler_map: &StdMutex<ResponseHandlerMap>,
15581558
mut task_receiver: mpsc::Receiver<Task>,
15591559
write_coalescing_delay: Option<WriteCoalescingDelay>,

scylla/tests/integration/macros/hygiene.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,7 @@ macro_rules! test_crate {
302302
_scylla::DeserializeRow, _scylla::SerializeRow, PartialEq, Debug,
303303
)]
304304
#[scylla(crate = _scylla)]
305-
// We would like to have this `expect(dead_code)`, but it does not work for
306-
// SerializeRow with by-name flavor. See https://github.com/scylladb/scylla-rust-driver/issues/1429
307-
// After fixing the above issue, we can add allow(dead_code)
308-
// After also bumping MSRV to 1.89+ we can add expect(dead_code).
305+
#[allow(dead_code)] // TODO: Change to expect after bumping MSRV to 1.90
309306
struct TestRowByName {
310307
#[scylla(skip)]
311308
a: ::core::primitive::i32,

0 commit comments

Comments
 (0)