Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
mmrrnn committed Jul 19, 2024
1 parent 3eaf744 commit de79b23
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
5 changes: 1 addition & 4 deletions libs/sdm/src/image/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ impl<C: ManagedProtocol> RunnableContext<ImageTask<C>> for TaskContext<ImageTask
}

fn is_active(&mut self) -> bool {
match self.status.get() {
Status::Active { .. } => true,
_ => false,
}
matches!(self.status.get(), Status::Active { .. })
}
}

Expand Down
5 changes: 1 addition & 4 deletions libs/sdm/src/network/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ impl<C: ManagedProtocol> RunnableContext<NetworkTask<C>> for TaskContext<Network
}

fn is_active(&mut self) -> bool {
match self.status.get() {
Status::Active { .. } => true,
_ => false,
}
matches!(self.status.get(), Status::Active { .. })
}
}

Expand Down
5 changes: 1 addition & 4 deletions libs/sdm/src/volume/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ impl<C: ManagedProtocol> RunnableContext<VolumeTask<C>> for TaskContext<VolumeTa
}

fn is_active(&mut self) -> bool {
match self.status.get() {
Status::Active { .. } => true,
_ => false,
}
matches!(self.status.get(), Status::Active { .. })
}
}

Expand Down

0 comments on commit de79b23

Please sign in to comment.