Skip to content

Commit

Permalink
updatehub-sdk: listener: Use default() to StateChangeListener::new(…
Browse files Browse the repository at this point in the history
…) impl

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
  • Loading branch information
otavio committed Oct 19, 2020
1 parent b2baec2 commit d218dd6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions updatehub-sdk/src/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ impl Handler {
impl StateChangeListener {
#[inline]
pub fn new() -> Self {
StateChangeListener {
download_callbacks: Vec::new(),
install_callbacks: Vec::new(),
reboot_callbacks: Vec::new(),
error_callbacks: Vec::new(),
}
StateChangeListener::default()
}

pub fn on_state<F, Fut>(&mut self, state: State, f: F)
Expand Down

0 comments on commit d218dd6

Please sign in to comment.