Skip to content

Commit fa1fa25

Browse files
satyamacnbors-diem
authored andcommitted
upgrade rust toolchain 1.62.1 && edition 2021 && cargo clippy --fix
Closes: #476
1 parent 725168d commit fa1fa25

File tree

91 files changed

+159
-136
lines changed

Some content is hidden

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

91 files changed

+159
-136
lines changed

devtools/x-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "x-core"
33
version = "0.1.0"
44
authors = ["Diem Association <opensource@diem.com>"]
55
description = "Core data structures used by x"
6-
edition = "2018"
6+
edition = "2021"
77
publish = false
88
license = "Apache-2.0"
99

devtools/x-lint/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "x-lint"
33
version = "0.1.0"
44
authors = ["Diem Association <opensource@diem.com>"]
55
description = "Lint engine for x"
6-
edition = "2018"
6+
edition = "2021"
77
publish = false
88
license = "Apache-2.0"
99

devtools/x/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "x"
33
version = "0.1.0"
44
authors = ["Diem Association <opensource@diem.com>"]
55
description = "Diem extended cargo tasks"
6-
edition = "2018"
6+
edition = "2021"
77
publish = false
88
license = "Apache-2.0"
99

devtools/x/src/lint/guppy.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use guppy::{
1313
};
1414
use std::{
1515
collections::{BTreeMap, HashMap},
16+
fmt::Write as FmtWrite,
1617
iter,
1718
};
1819
use x_core::{WorkspaceStatus, XCoreContext};
@@ -269,9 +270,7 @@ impl<'cfg> ProjectLinter for DirectDepDups<'cfg> {
269270
if versions.len() > 1 {
270271
let mut msg = format!("duplicate direct dependency '{}':\n", direct_dep);
271272
for (version, packages) in versions {
272-
msg.push_str(&format!(" * {} (", version));
273-
msg.push_str(&packages.join(", "));
274-
msg.push_str(")\n");
273+
writeln!(&mut msg, " * {} ({})", version, &packages.join(", ")).unwrap();
275274
}
276275
out.write(LintLevel::Error, msg);
277276
}
@@ -360,12 +359,14 @@ impl<'cfg> PackageLinter for OverlayFeatures<'cfg> {
360359
if !overlays.is_empty() {
361360
let mut msg = "overlay features enabled by default:\n".to_string();
362361
for (from_feature, to_package, to_feature) in overlays {
363-
msg.push_str(&format!(
364-
" * {} -> {}/{}\n",
362+
writeln!(
363+
&mut msg,
364+
" * {} -> {}/{}",
365365
feature_str(from_feature),
366366
to_package,
367367
feature_str(to_feature)
368-
));
368+
)
369+
.unwrap();
369370
}
370371
msg.push_str("Use a line in the [features] section instead.\n");
371372
out.write(LintLevel::Error, msg);

language/benchmarks/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repository = "https://github.com/diem/diem"
77
homepage = "https://diem.com"
88
license = "Apache-2.0"
99
publish = false
10-
edition = "2018"
10+
edition = "2021"
1111

1212
[dependencies]
1313
anyhow = "1.0.52"

language/documentation/examples/diem-framework/crates/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "CLI frontend for the Move compiler and VM (with Diem Framework)"
55
authors = ["Diem Association <opensource@diem.com>"]
66
license = "Apache-2.0"
77
publish = false
8-
edition = "2018"
8+
edition = "2021"
99

1010
[dependencies]
1111
anyhow = "1.0.52"

language/documentation/examples/diem-framework/crates/crypto-derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "diem-crypto-derive"
33
version = "0.0.3"
44
authors = ["Diem Association <opensource@diem.com>"]
55
publish = false
6-
edition = "2018"
6+
edition = "2021"
77
license = "Apache-2.0"
88

99
[lib]

language/documentation/examples/diem-framework/crates/crypto/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "diem-crypto"
33
version = "0.0.3"
44
authors = ["Diem Association <opensource@diem.com>"]
55
publish = false
6-
edition = "2018"
6+
edition = "2021"
77
license = "Apache-2.0"
88

99
[dependencies]

language/documentation/examples/diem-framework/crates/natives/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "diem-framework-natives"
33
version = "0.0.0"
44
authors = ["Diem Association <opensource@diem.com>"]
55
publish = false
6-
edition = "2018"
6+
edition = "2021"
77
license = "Apache-2.0"
88

99
[dependencies]

language/evm/extract-ethereum-abi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Diem Association <opensource@diem.com>"]
55
description = "Extract Etherem ABI"
66
publish = false
7-
edition = "2018"
7+
edition = "2021"
88
license = "Apache-2.0"
99

1010
[dependencies]

0 commit comments

Comments
 (0)