Skip to content

Commit 6fc44f5

Browse files
Merge pull request #218 from influxdata/crepererum/rust_172
chore: upgrade to Rust 1.72
2 parents c9a1b06 + 0dfff32 commit 6fc44f5

File tree

7 files changed

+10
-6
lines changed

7 files changed

+10
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "rskafka"
33
version = "0.5.0"
44
edition = "2021"
5+
rust-version = "1.72"
56
license = "MIT OR Apache-2.0"
67
readme = "README.md"
78
keywords = [

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.65"
2+
channel = "1.72"
33
components = [ "rustfmt", "clippy" ]

src/client/consumer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ impl Stream for StreamConsumer {
307307
*this.last_high_watermark = watermark;
308308
if let Some(x) = records_and_offsets.last() {
309309
*this.next_offset = Some(x.offset + 1);
310-
this.buffer.extend(records_and_offsets.into_iter())
310+
this.buffer.extend(records_and_offsets)
311311
}
312312
continue;
313313
}
@@ -480,7 +480,7 @@ mod tests {
480480

481481
buffer.push(RecordAndOffset {
482482
record,
483-
offset: record_offset as i64,
483+
offset: record_offset,
484484
});
485485
buffered += size
486486
}

src/client/partition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ fn build_produce_request(
665665
ProtocolRecord {
666666
key: record.key,
667667
value: record.value,
668-
timestamp_delta: (record.timestamp - first_timestamp).num_milliseconds() as i64,
668+
timestamp_delta: (record.timestamp - first_timestamp).num_milliseconds(),
669669
offset_delta: offset_delta as i32,
670670
headers: record
671671
.headers

src/connection/transport.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ pub use sasl::SaslConfig;
1717
pub type TlsConfig = Option<Arc<rustls::ClientConfig>>;
1818

1919
#[cfg(not(feature = "transport-tls"))]
20-
pub type TlsConfig = ();
20+
#[allow(missing_copy_implementations)]
21+
#[derive(Debug, Clone, Default)]
22+
pub struct TlsConfig();
2123

2224
#[derive(Debug, Error)]
2325
#[non_exhaustive]

src/protocol/record.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
//!
2020
//! [KIP-32]: https://cwiki.apache.org/confluence/display/KAFKA/KIP-32+-+Add+timestamps+to+Kafka+message
2121
//! [KIP-98]: https://cwiki.apache.org/confluence/display/KAFKA/KIP-98+-+Exactly+Once+Delivery+and+Transactional+Messaging
22+
#![allow(clippy::arc_with_non_send_sync)] // workaround for https://github.com/proptest-rs/proptest/issues/364
2223
use std::io::{Cursor, Read, Write};
2324

2425
#[cfg(test)]

tests/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ async fn test_produce_consume_size_cutoff() {
511511

512512
async move {
513513
let (records, _high_watermark) = partition_client
514-
.fetch_records(0, 1..(limit as i32), 1_000)
514+
.fetch_records(0, 1..limit, 1_000)
515515
.await
516516
.unwrap();
517517
if records.len() == 1 {

0 commit comments

Comments
 (0)