@@ -38,7 +38,8 @@ impl<Clock: crate::Clock> Instant<Clock> {
38
38
/// type Rep = u32;
39
39
/// const PERIOD: Period = <Period>::new(1, 1_000);
40
40
/// // ...
41
- /// # fn now(&self) -> Result<Instant<Self>, embedded_time::Error> {unimplemented!()}
41
+ /// # type ImplError = ();
42
+ /// # fn now(&self) -> Result<Instant<Self>, embedded_time::clock::Error<Self::ImplError>> {unimplemented!()}
42
43
/// }
43
44
///
44
45
/// assert_eq!(Instant::<Clock>::new(5).duration_since::<Microseconds<u64>>(&Instant::<Clock>::new(3)),
@@ -74,7 +75,8 @@ impl<Clock: crate::Clock> Instant<Clock> {
74
75
/// type Rep = u32;
75
76
/// const PERIOD: Period =<Period>::new(1, 1_000);
76
77
/// // ...
77
- /// # fn now(&self) -> Result<Instant<Self>, embedded_time::Error> {unimplemented!()}
78
+ /// # type ImplError = ();
79
+ /// # fn now(&self) -> Result<Instant<Self>, embedded_time::clock::Error<Self::ImplError>> {unimplemented!()}
78
80
/// }
79
81
///
80
82
/// assert_eq!(Instant::<Clock>::new(5).duration_until::<Microseconds<u64>>(&Instant::<Clock>::new(7)),
@@ -138,7 +140,8 @@ impl<Clock: crate::Clock> PartialOrd for Instant<Clock> {
138
140
/// type Rep = u32;
139
141
/// const PERIOD: Period =<Period>::new(1, 1_000);
140
142
/// // ...
141
- /// # fn now(&self) -> Result<Instant<Self>, embedded_time::Error> {unimplemented!()}
143
+ /// # type ImplError = ();
144
+ /// # fn now(&self) -> Result<Instant<Self>, embedded_time::clock::Error<Self::ImplError>> {unimplemented!()}
142
145
/// }
143
146
///
144
147
/// assert!(Instant::<Clock>::new(5) > Instant::<Clock>::new(3));
@@ -178,7 +181,8 @@ where
178
181
/// type Rep = u32;
179
182
/// const PERIOD: Period =<Period>::new(1, 1_000);
180
183
/// // ...
181
- /// # fn now(&self) -> Result<Instant<Self>, embedded_time::Error> {unimplemented!()}
184
+ /// # type ImplError = ();
185
+ /// # fn now(&self) -> Result<Instant<Self>, embedded_time::clock::Error<Self::ImplError>> {unimplemented!()}
182
186
/// }
183
187
///
184
188
/// Instant::<Clock>::new(1) + Seconds(u32::MAX);
@@ -194,7 +198,8 @@ where
194
198
/// type Rep = u32;
195
199
/// const PERIOD: Period =<Period>::new(1, 1_000);
196
200
/// // ...
197
- /// # fn now(&self) -> Result<Instant<Self>, embedded_time::Error> {unimplemented!()}
201
+ /// # type ImplError = ();
202
+ /// # fn now(&self) -> Result<Instant<Self>, embedded_time::clock::Error<Self::ImplError>> {unimplemented!()}
198
203
/// }
199
204
///
200
205
/// let _ = Instant::<Clock>::new(0) + Milliseconds(i32::MAX as u32 + 1);
@@ -211,7 +216,8 @@ where
211
216
/// type Rep = u32;
212
217
/// const PERIOD: Period =<Period>::new(1, 1_000);
213
218
/// // ...
214
- /// # fn now(&self) -> Result<Instant<Self>, embedded_time::Error> {unimplemented!()}
219
+ /// # type ImplError = ();
220
+ /// # fn now(&self) -> Result<Instant<Self>, embedded_time::clock::Error<Self::ImplError>> {unimplemented!()}
215
221
/// }
216
222
///
217
223
/// assert_eq!(Instant::<Clock>::new(1) + Seconds(3_u32), Instant::<Clock>::new(3_001));
@@ -251,7 +257,8 @@ where
251
257
/// type Rep = u32;
252
258
/// const PERIOD: Period =<Period>::new(1, 1_000);
253
259
/// // ...
254
- /// # fn now(&self) -> Result<Instant<Self>, embedded_time::Error> {unimplemented!()}
260
+ /// # type ImplError = ();
261
+ /// # fn now(&self) -> Result<Instant<Self>, embedded_time::clock::Error<Self::ImplError>> {unimplemented!()}
255
262
/// }
256
263
///
257
264
/// Instant::<Clock>::new(1) - Seconds(u32::MAX);
@@ -267,7 +274,8 @@ where
267
274
/// type Rep = u32;
268
275
/// const PERIOD: Period = <Period>::new(1, 1_000);
269
276
/// // ...
270
- /// # fn now(&self) -> Result<Instant<Self>, embedded_time::Error> {unimplemented!()}
277
+ /// # type ImplError = ();
278
+ /// # fn now(&self) -> Result<Instant<Self>, embedded_time::clock::Error<Self::ImplError>> {unimplemented!()}
271
279
/// }
272
280
///
273
281
/// let _ = Instant::<Clock>::new(u32::MAX) - Milliseconds(i32::MAX as u32 + 1);
@@ -284,7 +292,8 @@ where
284
292
/// type Rep = u32;
285
293
/// const PERIOD: Period =<Period>::new(1, 1_000);
286
294
/// // ...
287
- /// # fn now(&self) -> Result<Instant<Self>, embedded_time::Error> {unimplemented!()}
295
+ /// # type ImplError = ();
296
+ /// # fn now(&self) -> Result<Instant<Self>, embedded_time::clock::Error<Self::ImplError>> {unimplemented!()}
288
297
/// }
289
298
///
290
299
/// assert_eq!(Instant::<Clock>::new(800) - Milliseconds(700_u32), Instant::<Clock>::new(100));
@@ -314,8 +323,9 @@ mod tests {
314
323
impl time:: Clock for Clock {
315
324
type Rep = u32 ;
316
325
const PERIOD : Period = <Period >:: new ( 1 , 1_000 ) ;
326
+ type ImplError = ( ) ;
317
327
318
- fn now ( & self ) -> Result < Instant < Self > , time:: Error > {
328
+ fn now ( & self ) -> Result < Instant < Self > , time:: clock :: Error < Self :: ImplError > > {
319
329
unimplemented ! ( )
320
330
}
321
331
}
0 commit comments