improve maitake timer wheel #1329
Annotations
3 errors and 9 warnings
cargo clippy:
src/rt.rs#L55
error[E0308]: mismatched types
--> src/rt.rs:55:50
|
55 | pub static TIMER: time::Timer = time::Timer::new(arch::interrupt::TIMER_INTERVAL);
| ---------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&dyn Clock`, found `Duration`
| |
| arguments to this function are incorrect
|
= note: expected reference `&(dyn maitake::time::Clock + 'static)`
found struct `std::time::Duration`
note: associated function defined here
--> /home/runner/work/mycelium/mycelium/maitake/src/time/timer.rs:298:16
|
298 | pub fn new(clock: &'clock dyn Clock) -> Self {
| ^^^
|
cargo clippy:
src/rt.rs#L55
error[E0308]: mismatched types
--> src/rt.rs:55:50
|
55 | pub static TIMER: time::Timer = time::Timer::new(arch::interrupt::TIMER_INTERVAL);
| ---------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&dyn Clock`, found `Duration`
| |
| arguments to this function are incorrect
|
= note: expected reference `&(dyn maitake::time::Clock + 'static)`
found struct `std::time::Duration`
note: associated function defined here
--> /home/runner/work/mycelium/mycelium/maitake/src/time/timer.rs:298:16
|
298 | pub fn new(clock: &'clock dyn Clock) -> Self {
| ^^^
|
cargo clippy
Process completed with exit code 1.
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: extractions/setup-just@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
cargo clippy:
maitake/src/time/clock.rs#L161
warning: unused variable: `earlier`
--> maitake/src/time/clock.rs:161:42
|
161 | pub fn checked_duration_since(&self, earlier: Instant) -> Option<Duration> {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_earlier`
|
= note: `#[warn(unused_variables)]` on by default
|
cargo clippy:
maitake/src/time/clock.rs#L177
warning: unused variable: `duration`
--> maitake/src/time/clock.rs:177:31
|
177 | pub fn checked_add(&self, duration: Duration) -> Option<Instant> {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_duration`
|
cargo clippy:
maitake/src/time/clock.rs#L186
warning: unused variable: `duration`
--> maitake/src/time/clock.rs:186:31
|
186 | pub fn checked_sub(&self, duration: Duration) -> Option<Instant> {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_duration`
|
cargo clippy:
maitake/src/time/clock.rs#L94
warning: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`
--> maitake/src/time/clock.rs:94:1
|
94 | / pub(in crate::time) fn dur_to_ticks(
95 | | tick_duration: Duration,
96 | | dur: Duration,
97 | | ) -> Result<Ticks, TimerError> {
| |______________________________^
|
= help: either add some descriptive text or remove the attribute
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use
= note: `#[warn(clippy::double_must_use)]` on by default
|
cargo clippy:
maitake/src/time/clock.rs#L39
warning: missing documentation for a method
--> maitake/src/time/clock.rs:39:5
|
39 | fn tick_duration(&self) -> Duration;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> maitake/src/time.rs:45:9
|
45 | #![warn(missing_docs, missing_debug_implementations)]
| ^^^^^^^^^^^^
|
cargo clippy:
maitake/src/time/clock.rs#L42
warning: missing documentation for a method
--> maitake/src/time/clock.rs:42:5
|
42 | fn now(&self) -> Instant {
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
cargo clippy:
maitake/src/time/clock.rs#L48
warning: missing documentation for a method
--> maitake/src/time/clock.rs:48:5
|
48 | fn max_duration(&self) -> Duration {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
cargo clippy:
maitake/src/time/timer.rs#L307
warning: missing documentation for a method
--> maitake/src/time/timer.rs:307:5
|
307 | pub fn now(&self) -> Instant {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
The logs for this run have expired and are no longer available.
Loading