clippy: Fix several clippy issues
In order to enable several clippy lint groups fix several findings.
This commit is contained in:
parent
21bc394c58
commit
d6b82f0e72
10 changed files with 97 additions and 105 deletions
|
@ -10,10 +10,11 @@ use std::{
|
|||
pub struct List {}
|
||||
|
||||
impl List {
|
||||
#[allow(clippy::unused_self)]
|
||||
pub fn run(&self) -> Result<()> {
|
||||
for line in BufReader::new(File::open("/proc/sysvipc/msg")?).lines() {
|
||||
for field in line?.split_whitespace().collect::<Vec<&str>>() {
|
||||
print!("{0: <10}", field);
|
||||
for field in line?.split_whitespace() {
|
||||
print!("{field: <10}");
|
||||
}
|
||||
|
||||
println!();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue