Skip to content

Commit 93557ef

Browse files
bors[bot]mkroening
andauthored
Merge #387
387: Upgrade to nightly-2022-12-12 r=mkroening a=mkroening Co-authored-by: Martin Kröning <mkroening@posteo.net>
2 parents 095e782 + 469ca48 commit 93557ef

File tree

8 files changed

+16
-19
lines changed

8 files changed

+16
-19
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ENV RUSTUP_HOME=/usr/local/rustup \
55
CARGO_HOME=/usr/local/cargo \
66
PATH=/usr/local/cargo/bin:$PATH \
77
# Manually sync this with rust-toolchain.toml!
8-
RUST_VERSION=nightly-2022-10-19 \
8+
RUST_VERSION=nightly-2022-12-12 \
99
RUST_COMPONENTS="rust-src"
1010

1111
RUN set -eux; \

benches/netbench/src/connection.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn send_message(n_bytes: usize, stream: &mut TcpStream, wbuf: &[u8]) {
1616
Ok(n) => send += n,
1717
Err(err) => match err.kind() {
1818
WouldBlock => {}
19-
_ => panic!("Error occurred while writing: {:?}", err),
19+
_ => panic!("Error occurred while writing: {err:?}"),
2020
},
2121
}
2222
}
@@ -32,7 +32,7 @@ pub fn receive_message(n_bytes: usize, stream: &mut TcpStream, rbuf: &mut [u8])
3232
Ok(n) => recv += n,
3333
Err(err) => match err.kind() {
3434
WouldBlock => {}
35-
_ => panic!("Error occurred while reading: {:?}", err),
35+
_ => panic!("Error occurred while reading: {err:?}"),
3636
},
3737
}
3838
}
@@ -65,10 +65,7 @@ pub fn close_connection(stream: &TcpStream) {
6565
/// Starts listening on given port and return first connection to that port as a stream.
6666
pub fn server_listen_and_get_first_connection(port: &str) -> TcpStream {
6767
let listener = TcpListener::bind("0.0.0.0:".to_owned() + port).unwrap();
68-
println!(
69-
"Server running, listening for connection on 0.0.0.0:{}",
70-
port
71-
);
68+
println!("Server running, listening for connection on 0.0.0.0:{port}");
7269
let stream = listener.incoming().next().unwrap().unwrap();
7370
println!(
7471
"Connection established with {:?}!",

benches/netbench/src/print_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ pub fn print_summary(hist: hdrhist::HDRHist) {
1515
print_line();
1616
println!("CDF summary:\n");
1717
for entry in hist.ccdf_upper_bound() {
18-
println!("{:?}", entry);
18+
println!("{entry:?}");
1919
}
2020
}

benches/netbench/src/rust-tcp-bw/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn main() {
2828
let bytes_written = match stream.write(&buf[pos..]) {
2929
Ok(len) => len,
3030
Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => 0,
31-
Err(e) => panic!("encountered IO error: {}", e),
31+
Err(e) => panic!("encountered IO error: {e}"),
3232
};
3333
pos += bytes_written;
3434
}

benches/netbench/src/rust-tcp-latency/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn main() {
5858
print_utils::print_summary(hist);
5959
}
6060
Err(error) => {
61-
println!("Couldn't connect to server, retrying... Error {}", error);
61+
println!("Couldn't connect to server, retrying... Error {error}");
6262
thread::sleep(time::Duration::from_secs(1));
6363
}
6464
}

examples/demo/src/tests/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub fn pi_sequential(num_steps: u64) -> Result<(), ()> {
5454
}
5555

5656
let mypi = sum * (1.0 / num_steps as f64);
57-
println!("Pi: {} (sequential)", mypi);
57+
println!("Pi: {mypi} (sequential)");
5858

5959
if (mypi - PI).abs() < 0.00001 {
6060
Ok(())
@@ -82,7 +82,7 @@ pub fn pi_parallel(num_steps: u64) -> Result<(), ()> {
8282
});
8383

8484
let mypi = sum * (1.0 / num_steps as f64);
85-
println!("Pi: {} (with {} threads)", mypi, ncpus);
85+
println!("Pi: {mypi} (with {ncpus} threads)");
8686

8787
if (mypi - PI).abs() < 0.00001 {
8888
Ok(())
@@ -96,7 +96,7 @@ pub fn read_file() -> Result<(), std::io::Error> {
9696
let mut contents = String::new();
9797
file.read_to_string(&mut contents)?;
9898

99-
println!("Hostname: {}", contents);
99+
println!("Hostname: {contents}");
100100

101101
Ok(())
102102
}
@@ -130,7 +130,7 @@ pub fn print_argv() -> Result<(), ()> {
130130

131131
// Prints each argument on a separate line
132132
for (i, argument) in args.enumerate() {
133-
println!("argument[{}] = {}", i, argument);
133+
println!("argument[{i}] = {argument}");
134134
}
135135

136136
Ok(())
@@ -142,7 +142,7 @@ pub fn print_env() -> Result<(), ()> {
142142
// We will iterate through the references to the element returned by
143143
// env::vars();
144144
for (key, value) in envs {
145-
println!("{}: {}", key, value);
145+
println!("{key}: {value}");
146146
}
147147

148148
Ok(())
@@ -169,7 +169,7 @@ pub fn arithmetic() -> Result<(), ()> {
169169
let y: f64 = x.exp();
170170
let z: f64 = y.log(E);
171171

172-
println!("x = {}, e^x = {}, ln(e^x) = {}", x, y, z);
172+
println!("x = {x}, e^x = {y}, ln(e^x) = {z}");
173173

174174
Ok(())
175175
}
@@ -181,7 +181,7 @@ pub fn threading() -> Result<(), ()> {
181181
for i in 0..2 {
182182
// Spin up another thread
183183
children.push(thread::spawn(move || {
184-
println!("this is thread number {}", i);
184+
println!("this is thread number {i}");
185185
}));
186186
}
187187

libhermit-rs

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
22
# Manually sync this with Dockerfile!
3-
channel = "nightly-2022-10-19"
3+
channel = "nightly-2022-12-12"
44
components = [ "rust-src" ]

0 commit comments

Comments
 (0)