Skip to content

Commit c166148

Browse files
patrickelectricvalpackett
authored andcommitted
examples: info: Error is already used as string for println, there is no need to use to_string
Signed-off-by: Patrick José Pereira <[email protected]>
1 parent 0a72e35 commit c166148

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/info.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn main() {
3333
println!("{}: {:?}", blkstats.name, blkstats);
3434
}
3535
}
36-
Err(x) => println!("\nBlock statistics error: {}", x.to_string())
36+
Err(x) => println!("\nBlock statistics error: {}", x)
3737
}
3838

3939
match sys.networks() {
@@ -108,6 +108,6 @@ fn main() {
108108

109109
match sys.socket_stats() {
110110
Ok(stats) => println!("\nSystem socket statistics: {:?}", stats),
111-
Err(x) => println!("\nSystem socket statistics: error: {}", x.to_string())
111+
Err(x) => println!("\nSystem socket statistics: error: {}", x)
112112
}
113113
}

0 commit comments

Comments
 (0)