Skip to content

Commit ef15696

Browse files
authored
chore(deps): Upgrade rust to 1.69.0 (vectordotdev#17194)
* Bump rust to 1.69.0 * Fix name of `derived_hash_with_manual_eq` lint * Rewrite all `let _ =` to just `_ =` * Fix needless borrows * Update is-terminal to 0.4.7 * Patch ntapi to pull in fix for Windows unaligned access * Add ntapi spelling lookaside * Ignore failing file watcher assertion on Windows
1 parent d396320 commit ef15696

File tree

87 files changed

+195
-213
lines changed

Some content is hidden

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

87 files changed

+195
-213
lines changed

.github/actions/spelling/allow.txt

+1
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ nixpkgs
368368
nokia
369369
nslookup
370370
nsupdate
371+
ntapi
371372
ntfs
372373
opendal
373374
opensearch

Cargo.lock

+8-32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,9 @@ chrono = { git = "https://github.com/vectordotdev/chrono.git", tag = "v0.4.24-no
372372
# The upgrade for `tokio-util` >= 0.6.9 is blocked on https://github.com/vectordotdev/vector/issues/11257.
373373
tokio-util = { git = "https://github.com/vectordotdev/tokio", branch = "tokio-util-0.7.4-framed-read-continue-on-error" }
374374
nix = { git = "https://github.com/vectordotdev/nix.git", branch = "memfd/gnu/musl" }
375+
# The `heim` crates depend on `ntapi` 0.3.7 on Windows, but that version has an
376+
# unaligned access bug fixed in the following revision.
377+
ntapi = { git = "https://github.com/MSxDOS/ntapi.git", rev = "24fc1e47677fc9f6e38e5f154e6011dc9b270da6" }
375378

376379
[features]
377380
# Default features for *-unknown-linux-gnu and *-apple-darwin

Tiltfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ load('ext://helm_resource', 'helm_resource', 'helm_repo')
77
docker_build(
88
ref='timberio/vector',
99
context='.',
10-
build_args={'RUST_VERSION': '1.66.1'},
10+
build_args={'RUST_VERSION': '1.69.0'},
1111
dockerfile='tilt/Dockerfile'
1212
)
1313

lib/codecs/src/decoding/framing/octet_counting.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ mod tests {
406406
let mut buffer = BytesMut::with_capacity(32);
407407

408408
buffer.put(&b"32thisshouldbelongerthanthmaxframeasizewhichmeansthesyslogparserwillnotbeabletodecodeit"[..]);
409-
let _ = decoder.decode(&mut buffer);
409+
_ = decoder.decode(&mut buffer);
410410

411411
assert_eq!(decoder.octet_decoding, Some(State::DiscardingToEol));
412412
buffer.put(&b"wemustcontinuetodiscard\n32 something valid"[..]);

lib/file-source/benches/buffer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn read_until_bench(c: &mut Criterion) {
5757
let delimiter: [u8; 1] = [param.delim];
5858
group.bench_with_input(BenchmarkId::new("read_until", param), &param, |b, _| {
5959
b.iter(|| {
60-
let _ = read_until_with_max_size(
60+
_ = read_until_with_max_size(
6161
&mut reader,
6262
&mut position,
6363
&delimiter,

lib/file-source/src/file_watcher/tests/experiment.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ fn experiment(actions: Vec<FileWatcherAction>) {
4848
for action in actions.iter() {
4949
match *action {
5050
FileWatcherAction::DeleteFile => {
51-
let _ = fs::remove_file(&path);
51+
_ = fs::remove_file(&path);
52+
#[cfg(not(windows))] // Windows will only remove after the file is closed.
5253
assert!(!path.exists());
5354
fwfiles[0].reset();
5455
break;

lib/file-source/src/file_watcher/tests/experiment_no_truncations.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ fn experiment_no_truncations(actions: Vec<FileWatcherAction>) {
3232
for action in actions.iter() {
3333
match *action {
3434
FileWatcherAction::DeleteFile => {
35-
let _ = fs::remove_file(&path);
35+
_ = fs::remove_file(&path);
36+
#[cfg(not(windows))] // Windows will only remove after the file is closed.
3637
assert!(!path.exists());
3738
fwfiles[0].reset();
3839
break;

lib/k8s-e2e-tests/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub mod metrics;
1717
pub const BUSYBOX_IMAGE: &str = "busybox:1.28";
1818

1919
pub fn init() {
20-
let _ = env_logger::builder().is_test(true).try_init();
20+
_ = env_logger::builder().is_test(true).try_init();
2121
}
2222

2323
pub fn get_namespace() -> String {

lib/k8s-test-framework/src/temp_file.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl TempFile {
2323
impl Drop for TempFile {
2424
fn drop(&mut self) {
2525
if let Some(dir) = self.path.parent() {
26-
let _ = std::fs::remove_dir_all(dir);
26+
_ = std::fs::remove_dir_all(dir);
2727
}
2828
}
2929
}

lib/tracing-limit/benches/limit.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ struct Visitor<'a>(MutexGuard<'a, String>);
9797
impl<'a> field::Visit for Visitor<'a> {
9898
fn record_debug(&mut self, _field: &field::Field, value: &dyn fmt::Debug) {
9999
use std::fmt::Write;
100-
let _ = write!(&mut *self.0, "{:?}", value);
100+
_ = write!(&mut *self.0, "{:?}", value);
101101
}
102102
}
103103

@@ -110,7 +110,7 @@ where
110110
}
111111

112112
fn enabled(&self, metadata: &Metadata<'_>, _ctx: Context<'_, S>) -> bool {
113-
let _ = metadata;
113+
_ = metadata;
114114
true
115115
}
116116

@@ -130,23 +130,23 @@ where
130130
}
131131

132132
fn on_follows_from(&self, id: &span::Id, follows: &span::Id, _ctx: Context<'_, S>) {
133-
let _ = (id, follows);
133+
_ = (id, follows);
134134
}
135135

136136
fn on_enter(&self, id: &span::Id, _ctx: Context<'_, S>) {
137-
let _ = id;
137+
_ = id;
138138
}
139139

140140
fn on_exit(&self, id: &span::Id, _ctx: Context<'_, S>) {
141-
let _ = id;
141+
_ = id;
142142
}
143143

144144
fn on_close(&self, id: span::Id, _ctx: Context<'_, S>) {
145-
let _ = id;
145+
_ = id;
146146
}
147147

148148
fn on_id_change(&self, old: &span::Id, new: &span::Id, _ctx: Context<'_, S>) {
149-
let _ = (old, new);
149+
_ = (old, new);
150150
}
151151
}
152152

lib/vector-api-client/src/subscription.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl SubscriptionClient {
108108
_ = &mut shutdown_rx => {
109109
let subscriptions = subscriptions_clone.lock().unwrap();
110110
for id in subscriptions.keys() {
111-
let _ = tx_clone.send(Payload::stop(*id));
111+
_ = tx_clone.send(Payload::stop(*id));
112112
}
113113
break
114114
},
@@ -120,7 +120,7 @@ impl SubscriptionClient {
120120
let subscriptions = subscriptions_clone.lock().unwrap();
121121
let s: Option<&Sender<Payload>> = subscriptions.get::<Uuid>(&p.id);
122122
if let Some(s) = s {
123-
let _ = s.send(p);
123+
_ = s.send(p);
124124
}
125125
}
126126
None => {
@@ -159,8 +159,8 @@ impl SubscriptionClient {
159159
self.subscriptions.lock().unwrap().insert(id, tx);
160160

161161
// Initialize the connection with the relevant control messages.
162-
let _ = self.tx.send(Payload::init(id));
163-
let _ = self.tx.send(Payload::start::<T>(id, request_body));
162+
_ = self.tx.send(Payload::init(id));
163+
_ = self.tx.send(Payload::start::<T>(id, request_body));
164164

165165
Box::pin(
166166
BroadcastStream::new(rx)
@@ -185,7 +185,7 @@ pub async fn connect_subscription_client(
185185
// Forwarded received messages back upstream to the GraphQL server
186186
tokio::spawn(async move {
187187
while let Some(p) = send_rx.recv().await {
188-
let _ = ws_tx
188+
_ = ws_tx
189189
.send(Message::Text(serde_json::to_string(&p).unwrap()))
190190
.await;
191191
}
@@ -195,7 +195,7 @@ pub async fn connect_subscription_client(
195195
tokio::spawn(async move {
196196
while let Some(Ok(Message::Text(m))) = ws_rx.next().await {
197197
if let Ok(p) = serde_json::from_str::<Payload>(&m) {
198-
let _ = recv_tx.send(p);
198+
_ = recv_tx.send(p);
199199
}
200200
}
201201
});

lib/vector-buffers/benches/common.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl<const N: usize> FixedEncodable for Message<N> {
102102
let id = buffer.get_u64();
103103
for _ in 0..N {
104104
// this covers self._padding
105-
let _ = buffer.get_u64();
105+
_ = buffer.get_u64();
106106
}
107107
Ok(Message::new(id))
108108
}
@@ -177,6 +177,6 @@ pub async fn war_measurement<const N: usize>(
177177
) {
178178
for msg in messages.into_iter() {
179179
sender.send(msg).await.unwrap();
180-
let _ = receiver.next().await.unwrap();
180+
_ = receiver.next().await.unwrap();
181181
}
182182
}

lib/vector-buffers/src/topology/channel/tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ where
4444

4545
// Synchronize with sender and then wait for a small period of time to simulate a
4646
// blocking delay.
47-
let _ = recv_baton.wait().await;
47+
_ = recv_baton.wait().await;
4848
sleep(recv_delay).await;
4949

5050
// Grab all messages and then return the results.
@@ -58,7 +58,7 @@ where
5858
// task correctly exits. If we didn't drop it, the receiver task would just assume that we
5959
// had no more messages to send, waiting for-ev-er for the next one.
6060
let start = Instant::now();
61-
let _ = send_baton.wait().await;
61+
_ = send_baton.wait().await;
6262
assert!(sender.send(send_value.into()).await.is_ok());
6363
let send_delay = start.elapsed();
6464
assert!(send_delay > recv_delay);

lib/vector-buffers/src/variants/disk_v2/backed_archive.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ where
7171
for<'a> T::Archived: CheckBytes<DefaultValidator<'a>>,
7272
{
7373
// Validate that the input is, well, valid.
74-
let _ = check_archived_root::<T>(backing.as_ref())?;
74+
_ = check_archived_root::<T>(backing.as_ref())?;
7575

7676
// Now that we know the buffer fits T, we're good to go!
7777
Ok(Self {
@@ -110,7 +110,7 @@ where
110110
{
111111
// Serialize our value so we can shove it into the backing.
112112
let mut serializer = DefaultSerializer::default();
113-
let _ = serializer
113+
_ = serializer
114114
.serialize_value(&value)
115115
.map_err(|e| SerializeError::FailedToSerialize(e.to_string()))?;
116116

lib/vector-buffers/src/variants/disk_v2/tests/model/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ impl ReaderModel {
349349
// We have enough unconsumed event acknowledgements to fully acknowledge this
350350
// record. Remove it, consume the event acknowledgements, add a record
351351
// acknowledgement, and update the buffer size.
352-
let _ = self.pending_record_acks.pop_front().unwrap();
352+
_ = self.pending_record_acks.pop_front().unwrap();
353353
self.unconsumed_event_acks -= 1;
354354
self.unconsumed_record_acks += 1;
355355

@@ -369,7 +369,7 @@ impl ReaderModel {
369369
if self.unconsumed_record_acks >= required_record_acks {
370370
// We have enough unconsumed record acknowledgements to fully acknowledge this data
371371
// file. Remove it, consume the record acknowledgements, and delete the data file.
372-
let _ = self.pending_data_file_acks.pop_front().unwrap();
372+
_ = self.pending_data_file_acks.pop_front().unwrap();
373373
self.unconsumed_record_acks -= required_record_acks;
374374

375375
assert!(

lib/vector-common/src/event_test_util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub fn contains_name_once(pattern: &str) -> Result<(), String> {
2121
names.push_str(", ");
2222
}
2323
n_events += 1;
24-
let _ = write!(names, "`{event}`");
24+
_ = write!(names, "`{event}`");
2525
}
2626
}
2727
if n_events == 0 {

lib/vector-common/src/finalization.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ impl OwnedBatchNotifier {
266266
let status = self.status.load();
267267
// Ignore the error case, as it will happen during normal
268268
// source shutdown and we can't detect that here.
269-
let _ = notifier.send(status);
269+
_ = notifier.send(status);
270270
}
271271
}
272272
}

lib/vector-core/src/event/metric/tags.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl<'a> IntoIterator for &'a TagValueSet {
269269

270270
// The impl for `Hash` here follows the guarantees for the derived `PartialEq`, The resulting hash
271271
// will always be the same if the contents compare equal, so we can ignore the clippy lint.
272-
#[allow(clippy::derive_hash_xor_eq)]
272+
#[allow(clippy::derived_hash_with_manual_eq)]
273273
impl Hash for TagValueSet {
274274
fn hash<H: Hasher>(&self, hasher: &mut H) {
275275
match self {

lib/vector-core/src/metrics/recency.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl<T> Generational<T> {
110110
F: Fn(&T) -> V,
111111
{
112112
let result = f(&self.inner);
113-
let _ = self.gen.fetch_add(1, Ordering::AcqRel);
113+
_ = self.gen.fetch_add(1, Ordering::AcqRel);
114114
result
115115
}
116116
}

lib/vector-core/src/metrics/tests/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::event::Event;
66
#[ignore]
77
#[test]
88
fn test_labels_injection() {
9-
let _ = super::init();
9+
_ = super::init();
1010

1111
let span = span!(
1212
Level::ERROR,
@@ -46,7 +46,7 @@ fn test_labels_injection() {
4646

4747
#[test]
4848
fn test_cardinality_metric() {
49-
let _ = super::init();
49+
_ = super::init();
5050

5151
let capture_value = || {
5252
let metric = super::Controller::get()

rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.66.1"
2+
channel = "1.69.0"
33
profile = "default"

0 commit comments

Comments
 (0)