Skip to content

Commit 7827992

Browse files
committed
fix timer error types
1 parent 3103183 commit 7827992

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/timer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl Timer<SYST> {
131131

132132
impl CountDown for Timer<SYST> {
133133
type Time = Hertz;
134-
type Error = nb::Error<Error>;
134+
type Error = Error;
135135

136136
fn try_start<T>(&mut self, timeout: T) -> Result<(), Self::Error>
137137
where
@@ -160,7 +160,7 @@ impl CountDown for Timer<SYST> {
160160
impl Cancel for Timer<SYST> {
161161
fn try_cancel(&mut self) -> Result<(), Self::Error> {
162162
if !self.tim.is_counter_enabled() {
163-
return Err(nb::Error::Other(Error::Disabled));
163+
return Err(Error::Disabled);
164164
}
165165

166166
self.tim.disable_counter();

0 commit comments

Comments
 (0)