diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-07-06 12:06:03 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-07-06 12:06:03 +0200 |
commit | 1535fd5a0e40524c8015446debf2948439af89c9 (patch) | |
tree | e809e861103ca4bbb98001609eeb50d3a28368cf | |
parent | 692ba07615e4fef386bb27d9b70aa0e7ec957006 (diff) |
Remove the Result return type
The MainloopStopper::stop() function used to return Result, but there
was no error that could possibly happen.
Thus we refactor this function to not return anything.
Fixes lint: clippy::result_unit_err
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r-- | crates/core/tedge_lib/src/mainloop/stopper.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/core/tedge_lib/src/mainloop/stopper.rs b/crates/core/tedge_lib/src/mainloop/stopper.rs index ddeb7518..d2ffa75c 100644 --- a/crates/core/tedge_lib/src/mainloop/stopper.rs +++ b/crates/core/tedge_lib/src/mainloop/stopper.rs @@ -1,9 +1,8 @@ pub struct MainloopStopper(pub(super) tedge_api::CancellationToken); impl MainloopStopper { - pub fn stop(self) -> Result<(), ()> { + pub fn stop(self) { self.0.cancel(); - Ok(()) } } |