Commit bf883da
committed
Merge #1354: Fix issue generating coverage report
09396b5 fix: issue generating coverage report (Jose Celano)
Pull request description:
There wass a missing feature for tokio crate in the `udp-tracker-core` package.
```output
error[E0432]: unresolved import `tokio::time`
--> packages/udp-tracker-core/src/services/banning.rs:22:12
|
22 | use tokio::time::Instant;
| ^^^^ could not find `time` in `tokio`
|
note: found an item that was configured out
--> /home/josecelano/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/lib.rs:556:13
|
556 | pub mod time;
| ^^^^
note: the item is gated behind the `time` feature
--> /home/josecelano/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/lib.rs:555:1
|
555 | / cfg_time! {
556 | | pub mod time;
557 | | }
| |_^
= note: this error originates in the macro `cfg_time` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `time` in `tokio`
--> packages/udp-tracker-core/src/services/banning.rs:40:53
|
40 | last_connection_id_errors_reset: tokio::time::Instant::now(),
| ^^^^ could not find `time` in `tokio`
|
note: found an item that was configured out
--> /home/josecelano/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/lib.rs:556:13
|
556 | pub mod time;
| ^^^^
note: the item is gated behind the `time` feature
--> /home/josecelano/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/lib.rs:555:1
|
555 | / cfg_time! {
556 | | pub mod time;
557 | | }
| |_^
= note: this error originates in the macro `cfg_time` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this struct
|
18 + use std::time::Instant;
|
help: if you import `Instant`, refer to it directly
|
40 - last_connection_id_errors_reset: tokio::time::Instant::now(),
40 + last_connection_id_errors_reset: Instant::now(),
|
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `bittorrent-udp-tracker-core` (lib test) due to 2 previous errors
error: process didn't exit successfully: `/home/josecelano/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo test --tests --manifest-path /home/josecelano/Documents/git/committer/me/github/torrust/torrust-tracker/Cargo.toml --target-dir /home/josecelano/Documents/git/committer/me/github/torrust/torrust-tracker/target/llvm-cov-target --package bittorrent-udp-tracker-core` (exit status: 101)
```
ACKs for top commit:
josecelano:
ACK 09396b5
Tree-SHA512: 3b9559c28ac7ec00608816cac266f65a9b0122a9ccdb7165546255f0e26571c4cc20e2ef4b9504add4b72178bac780b631b003cc0e5e5a3b45181434cd2ae9e01 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
0 commit comments