Skip to content

Commit 38f0dd9

Browse files
goffrieConvex, Inc.
authored andcommitted
Switch to edition 2024 (#42346)
... except `convex` and `sync_types` which have a defined MSRV. GitOrigin-RevId: d2160aa9b0878747aacf8a5b88e1fdb8607f1677
1 parent dfafffa commit 38f0dd9

File tree

137 files changed

+566
-617
lines changed

Some content is hidden

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

137 files changed

+566
-617
lines changed

crates/application/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "application"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
license = "LicenseRef-FSL-1.1-Apache-2.0"
66

77
[lib]

crates/application/src/application_function_runner/http_routing.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ impl<RT: Runtime> ApplicationFunctionRunner<RT> {
354354

355355
// First, try matching an exact path from `http.js`, which will always
356356
// be the most specific match.
357-
if let Some(ref http_routes) = http_routes {
358-
if http_routes.route_exact(&routed_path[..], method) {
359-
return Ok(Some((current_component_path, routed_path)));
360-
}
357+
if let Some(ref http_routes) = http_routes
358+
&& http_routes.route_exact(&routed_path[..], method)
359+
{
360+
return Ok(Some((current_component_path, routed_path)));
361361
}
362362

363363
// Next, try finding the most specific prefix match from both `http.js`
@@ -368,10 +368,10 @@ impl<RT: Runtime> ApplicationFunctionRunner<RT> {
368368
}
369369
let mut longest_match = None;
370370

371-
if let Some(ref http_routes) = http_routes {
372-
if let Some(match_suffix) = http_routes.route_prefix(&routed_path, method) {
373-
longest_match = Some((match_suffix, CurrentMatch::CurrentHttpJs));
374-
}
371+
if let Some(ref http_routes) = http_routes
372+
&& let Some(match_suffix) = http_routes.route_prefix(&routed_path, method)
373+
{
374+
longest_match = Some((match_suffix, CurrentMatch::CurrentHttpJs));
375375
}
376376
for (mount_path, reference) in &definition.http_mounts {
377377
let Some(match_suffix) = routed_path.strip_prefix(&mount_path[..]) else {

crates/application/src/application_function_runner/mod.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,16 +1421,15 @@ impl<RT: Runtime> ApplicationFunctionRunner<RT> {
14211421

14221422
timer.finish();
14231423

1424-
if let Ok(ref mut node_outcome) = node_outcome_result {
1425-
if let Ok(ref output) = node_outcome.result {
1426-
if let Some(js_err) = returns_validator.check_output(
1427-
output,
1428-
&table_mapping,
1429-
&virtual_system_mapping,
1430-
) {
1431-
node_outcome.result = Err(js_err);
1432-
}
1433-
}
1424+
if let Ok(ref mut node_outcome) = node_outcome_result
1425+
&& let Ok(ref output) = node_outcome.result
1426+
&& let Some(js_err) = returns_validator.check_output(
1427+
output,
1428+
&table_mapping,
1429+
&virtual_system_mapping,
1430+
)
1431+
{
1432+
node_outcome.result = Err(js_err);
14341433
}
14351434

14361435
node_outcome_result.map(|node_outcome| {

crates/application/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![feature(try_blocks)]
22
#![feature(iterator_try_collect)]
3-
#![feature(let_chains)]
43
#![feature(coroutines)]
54
#![feature(round_char_boundary)]
65
#![feature(duration_constructors)]

crates/application/src/tests/scheduled_jobs.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
use std::str::FromStr;
1+
use std::{
2+
str::FromStr,
3+
time::Duration,
4+
};
25

36
use common::{
47
components::{
@@ -8,7 +11,6 @@ use common::{
811
PublicFunctionPath,
912
},
1013
execution_context::ExecutionContext,
11-
knobs::SCHEDULED_JOB_RETENTION,
1214
pause::{
1315
HoldGuard,
1416
PauseController,
@@ -185,6 +187,8 @@ async fn test_scheduled_jobs_garbage_collection(
185187
rt: TestRuntime,
186188
pause_controller: PauseController,
187189
) -> anyhow::Result<()> {
190+
// TODO: this is sketchy and could interfere with other tests in this process
191+
unsafe { std::env::set_var("SCHEDULED_JOB_RETENTION", "30") };
188192
let application = Application::new_for_tests(&rt).await?;
189193
application.load_udf_tests_modules().await?;
190194

@@ -213,7 +217,7 @@ async fn test_scheduled_jobs_garbage_collection(
213217
);
214218

215219
// Wait for garbage collector to clean up the job
216-
rt.wait(*SCHEDULED_JOB_RETENTION * 2).await;
220+
rt.wait(Duration::from_secs(60)).await;
217221
tx = application.begin(Identity::system()).await?;
218222
let state = SchedulerModel::new(&mut tx, TableNamespace::test_user())
219223
.check_status(job_id)

crates/async_lru/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "async_lru"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
license = "LicenseRef-FSL-1.1-Apache-2.0"
66

77
[dependencies]

crates/async_lru/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(let_chains)]
21
pub mod async_lru;
32
mod metrics;
43
pub mod multi_type_async_lru;

crates/authentication/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "authentication"
33
version = "0.1.0"
44
authors = ["Convex, Inc. <[email protected]>"]
5-
edition = "2021"
5+
edition = "2024"
66
license = "LicenseRef-FSL-1.1-Apache-2.0"
77

88
[lib]

crates/aws_s3/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "aws_s3"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
license = "LicenseRef-FSL-1.1-Apache-2.0"
66

77
[lib]

crates/aws_s3/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(future_join)]
2-
#![feature(let_chains)]
32
#![feature(coroutines)]
43
#![feature(iter_from_coroutine)]
54
#![feature(iterator_try_collect)]

0 commit comments

Comments
 (0)