Skip to content

Commit

Permalink
Remove unnecessary result unwrapping (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
mthmulders authored Feb 27, 2024
1 parent 24445f3 commit e0d2f78
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ pub fn main_loop(

loop {
let result = dsmr::reader::connect_to_meter(&serial_settings);
if result.is_ok() {
let port = result.unwrap();
if let Ok(port) = result {
dsmr::reader::read_from_serial_port(port, &mut consumer);
failure_count = 0;
} else {
Expand Down

0 comments on commit e0d2f78

Please sign in to comment.