Skip to content

Commit d2fa628

Browse files
authored
build: migrate to Rust edition 2024 (#1417)
1 parent 257d941 commit d2fa628

File tree

209 files changed

+768
-792
lines changed

Some content is hidden

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

209 files changed

+768
-792
lines changed

Cargo.lock

Lines changed: 148 additions & 159 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

benchmarks/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "benchmarks"
33
version = "0.0.0"
44
authors = ["Devolutions Inc. <infos@devolutions.net>"]
55
publish = false
6-
edition = "2021"
6+
edition = "2024"
77

88
# Prevent this from interfering with workspaces
99
[workspace]

crates/devolutions-agent-shared/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "devolutions-agent-shared"
33
version = "0.0.0"
44
authors = ["Devolutions Inc. <infos@devolutions.net>"]
55
description = "Shared code between the Devolutions Agent and the Devolutions Gateway"
6-
edition = "2021"
6+
edition = "2024"
77
publish = false
88

99
[lints]

crates/devolutions-agent-shared/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ pub mod windows;
77
mod date_version;
88
mod update_json;
99

10-
#[cfg(not(windows))]
11-
use std::convert::Infallible;
1210
use std::env;
1311

1412
use camino::Utf8PathBuf;

crates/devolutions-agent-shared/src/update_json.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl fmt::Display for VersionSpecification {
3030
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3131
match self {
3232
VersionSpecification::Latest => write!(f, "latest"),
33-
VersionSpecification::Specific(version) => write!(f, "{}", version),
33+
VersionSpecification::Specific(version) => write!(f, "{version}"),
3434
}
3535
}
3636
}
@@ -57,11 +57,11 @@ mod tests {
5757
];
5858

5959
for (serialized, deserialized) in cases {
60-
let parsed = serde_json::from_str::<VersionSpecification>(&format!("\"{}\"", serialized)).unwrap();
60+
let parsed = serde_json::from_str::<VersionSpecification>(&format!("\"{serialized}\"")).unwrap();
6161
assert_eq!(parsed, *deserialized);
6262

6363
let reserialized = serde_json::to_string(&parsed).unwrap();
64-
assert_eq!(reserialized, format!("\"{}\"", serialized));
64+
assert_eq!(reserialized, format!("\"{serialized}\""));
6565
}
6666
}
6767
}

crates/devolutions-agent-shared/src/windows/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ mod reversed_hex_uuid;
22

33
pub mod registry;
44

5-
use uuid::{uuid, Uuid};
5+
use uuid::{Uuid, uuid};
66

77
pub use reversed_hex_uuid::InvalidReversedHexUuid;
88

crates/devolutions-agent-shared/src/windows/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use uuid::Uuid;
22

3-
use crate::windows::reversed_hex_uuid::{reversed_hex_to_uuid, uuid_to_reversed_hex, InvalidReversedHexUuid};
43
use crate::DateVersion;
4+
use crate::windows::reversed_hex_uuid::{InvalidReversedHexUuid, reversed_hex_to_uuid, uuid_to_reversed_hex};
55

66
const REG_CURRENT_VERSION: &str = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion";
77

crates/devolutions-gateway-generators/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "devolutions-gateway-generators"
33
version = "0.0.0"
44
authors = ["Devolutions Inc. <infos@devolutions.net>"]
5-
edition = "2021"
5+
edition = "2024"
66
publish = false
77

88
[dependencies]

crates/devolutions-gateway-generators/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use devolutions_gateway::session::{ConnectionModeDetails, SessionInfo};
22
use devolutions_gateway::target_addr::TargetAddr;
33
use devolutions_gateway::token::{
4-
self, AccessScope, ApplicationProtocol, Protocol, RecordingPolicy, MAX_SUBKEY_TOKEN_VALIDITY_DURATION_SECS,
4+
self, AccessScope, ApplicationProtocol, MAX_SUBKEY_TOKEN_VALIDITY_DURATION_SECS, Protocol, RecordingPolicy,
55
};
66
use proptest::collection::vec;
77
use proptest::option;

crates/devolutions-gateway-task/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "devolutions-gateway-task"
33
version = "0.0.0"
44
authors = ["Devolutions Inc. <infos@devolutions.net>"]
5-
edition = "2021"
5+
edition = "2024"
66
publish = false
77

88
[lints]

0 commit comments

Comments
 (0)