Skip to content

Commit 25bd694

Browse files
authored
chore(consumers): Bump Rust toolchain version (#7252)
Bumps the Rust toolchain version to the latest stable. Bumping to >=1.85 is one of the solutions to proceed with #7250 Also fixes the new lints.
1 parent 5451c41 commit 25bd694

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

rust_snuba/rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "1.83.0"
2+
channel = "1.85.0"

rust_snuba/src/consumer.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,14 @@ pub fn consumer_impl(
557557
}
558558
}
559559

560-
pyo3::create_exception!(rust_snuba, SnubaRustError, pyo3::exceptions::PyException);
560+
#[expect(
561+
unexpected_cfgs,
562+
reason = "Fixed in pyo3 v0.23, see https://github.com/PyO3/pyo3/issues/4743"
563+
)]
564+
mod exceptions {
565+
pyo3::create_exception!(rust_snuba, SnubaRustError, pyo3::exceptions::PyException);
566+
}
567+
use exceptions::*;
561568

562569
/// insert: encoded rows
563570
type PyInsert = PyObject;

rust_snuba/src/strategies/python.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ impl ProcessingStrategy<KafkaPayload> for PythonTransformStep {
246246
message: transformed_message,
247247
})) => {
248248
self.transformed_messages.push_front(transformed_message);
249-
if deadline.map_or(false, |d| d.has_elapsed()) {
249+
if deadline.is_some_and(|d| d.has_elapsed()) {
250250
tracing::warn!("Timeout reached");
251251
break;
252252
}

0 commit comments

Comments
 (0)