Skip to content

Commit

Permalink
Rename getters into list and list_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 16, 2023
1 parent 311f530 commit e7e8a14
Show file tree
Hide file tree
Showing 18 changed files with 97 additions and 97 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ println!("=> disks:");
let mut disks = Disks::new();
// We refresh the disk list.
disks.refresh_list();
for disk in disks.iter() {
for disk in &disks {
println!("{disk:?}");
}

Expand All @@ -90,7 +90,7 @@ let mut components = Components::new();
// We refresh the component list.
components.refresh_list();
println!("=> components:");
for component in components.iter() {
for component in &components {
println!("{component:?}");
}
```
Expand Down
4 changes: 2 additions & 2 deletions examples/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,12 @@ fn interpret_input(
}
}
"disks" => {
for disk in disks.disks() {
for disk in disks {
writeln!(&mut io::stdout(), "{disk:?}");
}
}
"users" => {
for user in users.users() {
for user in users {
writeln!(
&mut io::stdout(),
"{:?} => {:?}",
Expand Down
Loading

0 comments on commit e7e8a14

Please sign in to comment.