Skip to content

Commit a6aac37

Browse files
committed
Update Rust to 1.67.0
Update Rust to 1.67.0, in CI, too, which brings changes to std::sync::mpsc [1], and upgrade our dependencies to prepare for release - [1]: https://blog.rust-lang.org/2023/01/26/Rust-1.67.0.html Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
1 parent a79b38e commit a6aac37

File tree

8 files changed

+98
-82
lines changed

8 files changed

+98
-82
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
rust: [stable]
1616
steps:
1717
- uses: actions/checkout@v3
18-
- uses: dtolnay/rust-toolchain@1.64.0
18+
- uses: dtolnay/rust-toolchain@1.67.0
1919
with:
2020
toolchain: ${{matrix.rust}}
2121
components: rust-src, rustfmt
@@ -47,7 +47,7 @@ jobs:
4747
rust: [stable]
4848
steps:
4949
- uses: actions/checkout@v3
50-
- uses: dtolnay/rust-toolchain@1.64.0
50+
- uses: dtolnay/rust-toolchain@1.67.0
5151
with:
5252
toolchain: ${{matrix.rust}}
5353
components: rust-src, rustfmt
@@ -66,7 +66,7 @@ jobs:
6666
runs-on: ubuntu-22.04
6767
steps:
6868
- uses: actions/checkout@v3
69-
- uses: dtolnay/rust-toolchain@1.64.0
69+
- uses: dtolnay/rust-toolchain@1.67.0
7070
with:
7171
components: rust-src, clippy, rustfmt
7272
- name: Install build system dependencies
@@ -94,7 +94,7 @@ jobs:
9494
rust: [stable]
9595
steps:
9696
- uses: actions/checkout@v3
97-
- uses: dtolnay/rust-toolchain@1.64.0
97+
- uses: dtolnay/rust-toolchain@1.67.0
9898
with:
9999
toolchain: ${{matrix.rust}}
100100
components: rust-src, rustfmt

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ goblin = "0.6.0"
1616
anyhow = {version= "1.0.68", features = ["backtrace"]}
1717
proc-maps = "0.3.0"
1818
serde = {version = "1.0.152", features = ["derive"] }
19-
clap = {version = "4.1.1", features = ["derive"]}
19+
clap = {version = "4.1.4", features = ["derive"]}
2020
serde_json = "1.0.91"
2121
chrono = "0.4.23"
2222
inferno = "0.11.14"

build.rs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl ParseCallbacks for BuildCallbacks {
3434
// Copied from bindgen::CargoCallbacks, to tell cargo to invalidate
3535
// the built crate whenever any of the included header files changed.
3636
fn include_file(&self, filename: &str) {
37-
println!("cargo:rerun-if-changed={}", filename);
37+
println!("cargo:rerun-if-changed={filename}");
3838
}
3939
}
4040

@@ -65,7 +65,7 @@ fn main() {
6565
.unwrap()
6666
.read_to_string(&mut contents)
6767
.unwrap();
68-
let new_contents = format!("use serde::{{Serialize, Deserialize}};\n{}", contents);
68+
let new_contents = format!("use serde::{{Serialize, Deserialize}};\n{contents}");
6969
File::create(&bindings_out_file)
7070
.unwrap()
7171
.write_all(new_contents.as_bytes())
@@ -80,7 +80,7 @@ fn main() {
8080
Ok(_) => {}
8181
Err(err) => match err {
8282
Error::Build(msg) | Error::Generate(msg) => {
83-
panic!("Error running SkeletonBuilder for rbperf = {}", msg);
83+
panic!("Error running SkeletonBuilder for rbperf = {msg}");
8484
}
8585
},
8686
}
@@ -91,10 +91,7 @@ fn main() {
9191
.unwrap()
9292
.read_to_string(&mut contents)
9393
.unwrap();
94-
let new_contents = format!(
95-
"#![allow(clippy::derive_partial_eq_without_eq)]\n{}",
96-
contents
97-
);
94+
let new_contents = format!("#![allow(clippy::derive_partial_eq_without_eq)]\n{contents}");
9895
File::create(skel)
9996
.unwrap()
10097
.write_all(new_contents.as_bytes())
@@ -110,15 +107,12 @@ fn main() {
110107
Ok(_) => {}
111108
Err(err) => match err {
112109
Error::Build(msg) | Error::Generate(msg) => {
113-
panic!(
114-
"Error running SkeletonBuilder for feature detector = {}",
115-
msg
116-
);
110+
panic!("Error running SkeletonBuilder for feature detector = {msg}");
117111
}
118112
},
119113
}
120114

121-
println!("cargo:rerun-if-changed={}", RUBY_STACK_SOURCE);
122-
println!("cargo:rerun-if-changed={}", RUBY_STACK_HEADER);
123-
println!("cargo:rerun-if-changed={}", FEATURES_SOURCE);
115+
println!("cargo:rerun-if-changed={RUBY_STACK_SOURCE}");
116+
println!("cargo:rerun-if-changed={RUBY_STACK_HEADER}");
117+
println!("cargo:rerun-if-changed={FEATURES_SOURCE}");
124118
}

src/events.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,7 @@ pub unsafe fn setup_syscall_event(syscall: &str) -> Result<c_int> {
7676
..Default::default()
7777
};
7878

79-
let path = format!(
80-
"/sys/kernel/debug/tracing/events/syscalls/sys_{}/id",
81-
syscall
82-
);
79+
let path = format!("/sys/kernel/debug/tracing/events/syscalls/sys_{syscall}/id");
8380
let mut id = fs::read_to_string(&path).map_err(|_| EventError::EventNameDoesNotExist {
8481
name: syscall.to_string(),
8582
})?;

src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ fn main() -> Result<()> {
123123
println!();
124124

125125
for syscall in available_syscalls() {
126-
println!("{}", syscall);
126+
println!("{syscall}");
127127
}
128128
return Ok(());
129129
}
@@ -174,20 +174,20 @@ fn main() -> Result<()> {
174174
let now: DateTime<Utc> = Utc::now();
175175
let name_suffix = now.format("%m%d%Y_%Hh%Mm%Ss");
176176

177-
let flame_path = format!("rbperf_flame_{}.svg", name_suffix);
177+
let flame_path = format!("rbperf_flame_{name_suffix}.svg");
178178
let f = File::create(&flame_path).unwrap();
179179
flamegraph::from_reader(&mut options, data, f).unwrap();
180180

181181
let serialized = serde_json::to_string(&profile).unwrap();
182-
fs::write(format!("rbperf_out_{}.json", name_suffix), serialized)
182+
fs::write(format!("rbperf_out_{name_suffix}.json"), serialized)
183183
.expect("Unable to write file");
184184

185185
println!(
186186
"Got {} samples and {} errors",
187187
stats.total_events,
188188
stats.total_errors()
189189
);
190-
println!("Flamegraph written to: {}", flame_path);
190+
println!("Flamegraph written to: {flame_path}");
191191
}
192192
}
193193

0 commit comments

Comments
 (0)