Fix more Clippy warnings.

This commit is contained in:
Guillaume Endignoux
2020-09-24 15:08:12 +02:00
parent b46b103db0
commit 68b0bdc29b
7 changed files with 20 additions and 16 deletions

View File

@@ -23,8 +23,8 @@ fn main() {
let mut buf = [0; BUFFER_SIZE];
loop {
for i in 1..buf.len() {
for j in 0..i {
buf[j] = b'0' + ((i % 10) as u8);
for byte in buf.iter_mut().take(i) {
*byte = b'0' + ((i % 10) as u8);
}
buf[i] = b'\n';
Console::write_unbuffered(&mut buf[..(i + 1)]);

View File

@@ -151,7 +151,7 @@ fn main() {
fn bench<F>(console: &mut Console, timer: &Timer, title: &str, mut f: F)
where
F: FnMut() -> (),
F: FnMut(),
{
writeln!(console, "****************************************").unwrap();
writeln!(console, "Benchmarking: {}", title).unwrap();