Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix committed Jan 25, 2021
1 parent 028f4f5 commit bda4a19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/enumerator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,14 @@ mod tests {

#[test]
fn test_enumeration() {
fn find_hidraws() -> Devices {
let mut en = Enumerator::new().unwrap();
fn find_hidraws(en: &mut Enumerator) -> Devices<'_> {
en.match_is_initialized().unwrap();
en.match_subsystem("hidraw").unwrap();
en.scan_devices().unwrap()
}

for dev in find_hidraws() {

let mut en = Enumerator::new().unwrap();
for dev in find_hidraws(&mut en) {
println!("Found a hidraw at {:?}", dev.devnode());
}
}
Expand Down

0 comments on commit bda4a19

Please sign in to comment.