tokio-rs / tokio

A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
https://tokio.rs
MIT License
27.05k stars 2.49k forks source link

use of undeclared crate or module `tracing` #4939

Closed mutantbob closed 2 years ago

mutantbob commented 2 years ago

Version

tokio v1.17.0 tokio-util v0.7.1

Platform

Linux herakleion 5.4.72-gentoo #1 SMP Fri Nov 13 19:51:13 EST 2020 x86_64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz GenuineIntel GNU/Linux

Description I dusted off an old app that uses the reqwest crate and tried to compile it and got the following error:

error[E0432]: unresolved import `tracing`
  --> /home/thoth/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-util-0.7.1/src/codec/framed_impl.rs:15:5
   |
15 | use tracing::trace;
   |     ^^^^^^^ use of undeclared crate or module `tracing`

cargo tree reports

decrypting-download v0.1.0 (/home/thoth/src/rust-arduino-blink-3/decrypting-download)
|-- bytes feature "default"
|   |-- bytes v1.1.0
|   `-- bytes feature "std"
|       `-- bytes v1.1.0
|-- chacha20 feature "default"
|   `-- chacha20 v0.9.0
|       |-- cfg-if feature "default"
|       |   `-- cfg-if v1.0.0
|       |-- cipher feature "default"
|       |   `-- cipher v0.4.3
|       |       |-- crypto-common feature "default"
|       |       |   `-- crypto-common v0.1.3
|       |       |       |-- generic-array feature "default"
|       |       |       |   `-- generic-array v0.14.5
|       |       |       |       `-- typenum feature "default"
|       |       |       |           `-- typenum v1.15.0
|       |       |       |       [build-dependencies]
|       |       |       |       `-- version_check feature "default"
|       |       |       |           `-- version_check v0.9.4
|       |       |       |-- generic-array feature "more_lengths"
|       |       |       |   `-- generic-array v0.14.5 (*)
|       |       |       `-- typenum feature "default" (*)
|       |       `-- inout feature "default"
|       |           `-- inout v0.1.3
|       |               `-- generic-array feature "default" (*)
|       `-- cpufeatures feature "default"
|           `-- cpufeatures v0.2.2
|-- cipher feature "default" (*)
|-- curl feature "default"
|   |-- curl v0.4.43
|   |   |-- curl-sys v0.4.53+curl-7.82.0
|   |   |   |-- libc feature "default"
|   |   |   |   |-- libc v0.2.124
|   |   |   |   `-- libc feature "std"
|   |   |   |       `-- libc v0.2.124
|   |   |   |-- libz-sys feature "libc"
|   |   |   |   `-- libz-sys v1.1.5
|   |   |   |       `-- libc feature "default" (*)
|   |   |   |       [build-dependencies]
|   |   |   |       |-- cc feature "default"
|   |   |   |       |   `-- cc v1.0.73
|   |   |   |       `-- pkg-config feature "default"
|   |   |   |           `-- pkg-config v0.3.25
|   |   |   `-- openssl-sys feature "default"
|   |   |       `-- openssl-sys v0.9.72
|   |   |           `-- libc feature "default" (*)
|   |   |           [build-dependencies]
|   |   |           |-- cc feature "default" (*)
|   |   |           |-- pkg-config feature "default" (*)
|   |   |           `-- autocfg feature "default"
|   |   |               `-- autocfg v1.1.0
|   |   |   [build-dependencies]
|   |   |   |-- cc feature "default" (*)
|   |   |   `-- pkg-config feature "default" (*)
|   |   |-- libc feature "default" (*)
|   |   |-- openssl-sys feature "default" (*)
|   |   |-- openssl-probe feature "default"
|   |   |   `-- openssl-probe v0.1.5
|   |   `-- socket2 feature "default"
|   |       `-- socket2 v0.4.4
|   |           `-- libc feature "default" (*)
|   `-- curl feature "ssl"
|       |-- curl v0.4.43 (*)
|       |-- curl feature "openssl-probe"
|       |   `-- curl v0.4.43 (*)
|       |-- curl feature "openssl-sys"
|       |   `-- curl v0.4.43 (*)
|       `-- curl-sys feature "ssl"
|           |-- curl-sys v0.4.53+curl-7.82.0 (*)
|           `-- curl-sys feature "openssl-sys"
|               `-- curl-sys v0.4.53+curl-7.82.0 (*)
|-- regex feature "default"
|   |-- regex v1.5.5
|   |   |-- regex-syntax v0.6.25
|   |   |-- aho-corasick feature "default"
|   |   |   |-- aho-corasick v0.7.18
|   |   |   |   `-- memchr v2.4.1
|   |   |   `-- aho-corasick feature "std"
|   |   |       |-- aho-corasick v0.7.18 (*)
|   |   |       `-- memchr feature "std"
|   |   |           `-- memchr v2.4.1
|   |   `-- memchr feature "default"
|   |       |-- memchr v2.4.1
|   |       `-- memchr feature "std" (*)
|   |-- regex feature "perf"
|   |   |-- regex v1.5.5 (*)
|   |   |-- regex feature "perf-cache"
|   |   |   `-- regex v1.5.5 (*)
|   |   |-- regex feature "perf-dfa"
|   |   |   `-- regex v1.5.5 (*)
|   |   |-- regex feature "perf-inline"
|   |   |   `-- regex v1.5.5 (*)
|   |   `-- regex feature "perf-literal"
|   |       |-- regex v1.5.5 (*)
|   |       |-- regex feature "aho-corasick"
|   |       |   `-- regex v1.5.5 (*)
|   |       `-- regex feature "memchr"
|   |           `-- regex v1.5.5 (*)
|   |-- regex feature "std"
|   |   `-- regex v1.5.5 (*)
|   |-- regex feature "unicode"
|   |   |-- regex v1.5.5 (*)
|   |   |-- regex feature "unicode-age"
|   |   |   |-- regex v1.5.5 (*)
|   |   |   `-- regex-syntax feature "unicode-age"
|   |   |       `-- regex-syntax v0.6.25
|   |   |-- regex feature "unicode-bool"
|   |   |   |-- regex v1.5.5 (*)
|   |   |   `-- regex-syntax feature "unicode-bool"
|   |   |       `-- regex-syntax v0.6.25
|   |   |-- regex feature "unicode-case"
|   |   |   |-- regex v1.5.5 (*)
|   |   |   `-- regex-syntax feature "unicode-case"
|   |   |       `-- regex-syntax v0.6.25
|   |   |-- regex feature "unicode-gencat"
|   |   |   |-- regex v1.5.5 (*)
|   |   |   `-- regex-syntax feature "unicode-gencat"
|   |   |       `-- regex-syntax v0.6.25
|   |   |-- regex feature "unicode-perl"
|   |   |   |-- regex v1.5.5 (*)
|   |   |   `-- regex-syntax feature "unicode-perl"
|   |   |       `-- regex-syntax v0.6.25
|   |   |-- regex feature "unicode-script"
|   |   |   |-- regex v1.5.5 (*)
|   |   |   `-- regex-syntax feature "unicode-script"
|   |   |       `-- regex-syntax v0.6.25
|   |   |-- regex feature "unicode-segment"
|   |   |   |-- regex v1.5.5 (*)
|   |   |   `-- regex-syntax feature "unicode-segment"
|   |   |       `-- regex-syntax v0.6.25
|   |   `-- regex-syntax feature "unicode"
|   |       |-- regex-syntax v0.6.25
|   |       |-- regex-syntax feature "unicode-age" (*)
|   |       |-- regex-syntax feature "unicode-bool" (*)
|   |       |-- regex-syntax feature "unicode-case" (*)
|   |       |-- regex-syntax feature "unicode-gencat" (*)
|   |       |-- regex-syntax feature "unicode-perl" (*)
|   |       |-- regex-syntax feature "unicode-script" (*)
|   |       `-- regex-syntax feature "unicode-segment" (*)
|   `-- regex-syntax feature "default"
|       |-- regex-syntax v0.6.25
|       `-- regex-syntax feature "unicode" (*)
|-- reqwest feature "default"
|   |-- reqwest v0.11.10
|   |   |-- futures-core v0.3.21
|   |   |-- futures-util v0.3.21
|   |   |   |-- futures-core v0.3.21
|   |   |   |-- futures-task v0.3.21
|   |   |   |-- pin-project-lite feature "default"
|   |   |   |   `-- pin-project-lite v0.2.8
|   |   |   `-- pin-utils feature "default"
|   |   |       `-- pin-utils v0.1.0
|   |   |-- bytes feature "default" (*)
|   |   |-- base64 feature "default"
|   |   |   |-- base64 v0.13.0
|   |   |   `-- base64 feature "std"
|   |   |       `-- base64 v0.13.0
|   |   |-- encoding_rs feature "default"
|   |   |   |-- encoding_rs v0.8.31
|   |   |   |   `-- cfg-if feature "default" (*)
|   |   |   `-- encoding_rs feature "alloc"
|   |   |       `-- encoding_rs v0.8.31 (*)
|   |   |-- pin-project-lite feature "default" (*)
|   |   |-- h2 feature "default"
|   |   |   `-- h2 v0.3.13
|   |   |       |-- futures-core v0.3.21
|   |   |       |-- futures-sink v0.3.21
|   |   |       |-- futures-util v0.3.21 (*)
|   |   |       |-- bytes feature "default" (*)
|   |   |       |-- fnv feature "default"
|   |   |       |   |-- fnv v1.0.7
|   |   |       |   `-- fnv feature "std"
|   |   |       |       `-- fnv v1.0.7
|   |   |       |-- http feature "default"
|   |   |       |   `-- http v0.2.6
|   |   |       |       |-- bytes feature "default" (*)
|   |   |       |       |-- fnv feature "default" (*)
|   |   |       |       `-- itoa feature "default"
|   |   |       |           `-- itoa v1.0.1
|   |   |       |-- indexmap feature "default"
|   |   |       |   `-- indexmap v1.8.1
|   |   |       |       `-- hashbrown feature "raw"
|   |   |       |           `-- hashbrown v0.11.2
|   |   |       |       [build-dependencies]
|   |   |       |       `-- autocfg feature "default" (*)
|   |   |       |-- indexmap feature "std"
|   |   |       |   `-- indexmap v1.8.1 (*)
|   |   |       |-- slab feature "default"
|   |   |       |   |-- slab v0.4.6
|   |   |       |   `-- slab feature "std"
|   |   |       |       `-- slab v0.4.6
|   |   |       |-- tokio feature "default"
|   |   |       |   `-- tokio v1.17.0
|   |   |       |       |-- bytes feature "default" (*)
|   |   |       |       |-- libc feature "default" (*)
|   |   |       |       |-- socket2 feature "all"
|   |   |       |       |   `-- socket2 v0.4.4 (*)
|   |   |       |       |-- socket2 feature "default" (*)
|   |   |       |       |-- memchr feature "default" (*)
|   |   |       |       |-- pin-project-lite feature "default" (*)
|   |   |       |       |-- mio feature "default"
|   |   |       |       |   `-- mio v0.8.2
|   |   |       |       |       |-- libc feature "default" (*)
|   |   |       |       |       `-- log feature "default"
|   |   |       |       |           `-- log v0.4.16
|   |   |       |       |               `-- cfg-if feature "default" (*)
|   |   |       |       |-- num_cpus feature "default"
|   |   |       |       |   `-- num_cpus v1.13.1
|   |   |       |       |       `-- libc feature "default" (*)
|   |   |       |       `-- tokio-macros feature "default"
|   |   |       |           `-- tokio-macros v1.7.0 (proc-macro)
|   |   |       |               |-- proc-macro2 feature "default"
|   |   |       |               |   |-- proc-macro2 v1.0.37
|   |   |       |               |   |   `-- unicode-xid feature "default"
|   |   |       |               |   |       `-- unicode-xid v0.2.2
|   |   |       |               |   `-- proc-macro2 feature "proc-macro"
|   |   |       |               |       `-- proc-macro2 v1.0.37 (*)
|   |   |       |               |-- quote feature "default"
|   |   |       |               |   |-- quote v1.0.18
|   |   |       |               |   |   `-- proc-macro2 v1.0.37 (*)
|   |   |       |               |   `-- quote feature "proc-macro"
|   |   |       |               |       |-- quote v1.0.18 (*)
|   |   |       |               |       `-- proc-macro2 feature "proc-macro" (*)
|   |   |       |               |-- syn feature "default"
|   |   |       |               |   |-- syn v1.0.91
|   |   |       |               |   |   |-- proc-macro2 v1.0.37 (*)
|   |   |       |               |   |   |-- quote v1.0.18 (*)
|   |   |       |               |   |   `-- unicode-xid feature "default" (*)
|   |   |       |               |   |-- syn feature "clone-impls"
|   |   |       |               |   |   `-- syn v1.0.91 (*)
|   |   |       |               |   |-- syn feature "derive"
|   |   |       |               |   |   `-- syn v1.0.91 (*)
|   |   |       |               |   |-- syn feature "parsing"
|   |   |       |               |   |   `-- syn v1.0.91 (*)
|   |   |       |               |   |-- syn feature "printing"
|   |   |       |               |   |   |-- syn v1.0.91 (*)
|   |   |       |               |   |   `-- syn feature "quote"
|   |   |       |               |   |       `-- syn v1.0.91 (*)
|   |   |       |               |   `-- syn feature "proc-macro"
|   |   |       |               |       |-- syn v1.0.91 (*)
|   |   |       |               |       |-- proc-macro2 feature "proc-macro" (*)
|   |   |       |               |       |-- quote feature "proc-macro" (*)
|   |   |       |               |       `-- syn feature "quote" (*)
|   |   |       |               `-- syn feature "full"
|   |   |       |                   `-- syn v1.0.91 (*)
|   |   |       |-- tokio feature "io-util"
|   |   |       |   |-- tokio v1.17.0 (*)
|   |   |       |   |-- tokio feature "bytes"
|   |   |       |   |   `-- tokio v1.17.0 (*)
|   |   |       |   `-- tokio feature "memchr"
|   |   |       |       `-- tokio v1.17.0 (*)
|   |   |       |-- tokio-util feature "codec"
|   |   |       |   |-- tokio-util v0.7.1
|   |   |       |   |   |-- bytes feature "default" (*)
|   |   |       |   |   |-- futures-core feature "default"
|   |   |       |   |   |   |-- futures-core v0.3.21
|   |   |       |   |   |   `-- futures-core feature "std"
|   |   |       |   |   |       |-- futures-core v0.3.21
|   |   |       |   |   |       `-- futures-core feature "alloc"
|   |   |       |   |   |           `-- futures-core v0.3.21
|   |   |       |   |   |-- pin-project-lite feature "default" (*)
|   |   |       |   |   |-- futures-sink feature "default"
|   |   |       |   |   |   |-- futures-sink v0.3.21
|   |   |       |   |   |   `-- futures-sink feature "std"
|   |   |       |   |   |       |-- futures-sink v0.3.21
|   |   |       |   |   |       `-- futures-sink feature "alloc"
|   |   |       |   |   |           `-- futures-sink v0.3.21
|   |   |       |   |   |-- tokio feature "default" (*)
|   |   |       |   |   |-- tokio feature "sync"
|   |   |       |   |   |   `-- tokio v1.17.0 (*)
|   |   |       |   |   `-- tracing feature "default"
|   |   |       |   |       |-- tracing v0.1.34
|   |   |       |   |       |   |-- tracing-core v0.1.26
|   |   |       |   |       |   |   `-- lazy_static feature "default"
|   |   |       |   |       |   |       `-- lazy_static v1.4.0
|   |   |       |   |       |   |-- cfg-if feature "default" (*)
|   |   |       |   |       |   |-- pin-project-lite feature "default" (*)
|   |   |       |   |       |   `-- tracing-attributes feature "default"
|   |   |       |   |       |       `-- tracing-attributes v0.1.20 (proc-macro)
|   |   |       |   |       |           |-- proc-macro2 feature "default" (*)
|   |   |       |   |       |           |-- quote feature "default" (*)
|   |   |       |   |       |           |-- syn feature "clone-impls" (*)
|   |   |       |   |       |           |-- syn feature "extra-traits"
|   |   |       |   |       |           |   `-- syn v1.0.91 (*)
|   |   |       |   |       |           |-- syn feature "full" (*)
|   |   |       |   |       |           |-- syn feature "parsing" (*)
|   |   |       |   |       |           |-- syn feature "printing" (*)
|   |   |       |   |       |           |-- syn feature "proc-macro" (*)
|   |   |       |   |       |           |-- syn feature "visit"
|   |   |       |   |       |           |   `-- syn v1.0.91 (*)
|   |   |       |   |       |           `-- syn feature "visit-mut"
|   |   |       |   |       |               `-- syn v1.0.91 (*)
|   |   |       |   |       |-- tracing feature "attributes"
|   |   |       |   |       |   |-- tracing v0.1.34 (*)
|   |   |       |   |       |   `-- tracing feature "tracing-attributes"
|   |   |       |   |       |       `-- tracing v0.1.34 (*)
|   |   |       |   |       `-- tracing feature "std"
|   |   |       |   |           |-- tracing v0.1.34 (*)
|   |   |       |   |           `-- tracing-core feature "std"
|   |   |       |   |               |-- tracing-core v0.1.26 (*)
|   |   |       |   |               `-- tracing-core feature "lazy_static"
|   |   |       |   |                   `-- tracing-core v0.1.26 (*)
|   |   |       |   `-- tokio-util feature "tracing"
|   |   |       |       `-- tokio-util v0.7.1 (*)
|   |   |       |-- tokio-util feature "default"
|   |   |       |   `-- tokio-util v0.7.1 (*)
|   |   |       `-- tracing feature "std" (*)
|   |   |-- http feature "default" (*)
|   |   |-- tokio feature "net"
|   |   |   |-- tokio v1.17.0 (*)
|   |   |   |-- tokio feature "libc"
|   |   |   |   `-- tokio v1.17.0 (*)
|   |   |   |-- tokio feature "mio"
|   |   |   |   `-- tokio v1.17.0 (*)
|   |   |   |-- tokio feature "socket2"
|   |   |   |   `-- tokio v1.17.0 (*)
|   |   |   |-- mio feature "net"
|   |   |   |   `-- mio v0.8.2 (*)
|   |   |   |-- mio feature "os-ext"
|   |   |   |   |-- mio v0.8.2 (*)
|   |   |   |   `-- mio feature "os-poll"
|   |   |   |       `-- mio v0.8.2 (*)
|   |   |   `-- mio feature "os-poll" (*)
|   |   |-- tokio feature "time"
|   |   |   `-- tokio v1.17.0 (*)
|   |   |-- log feature "default" (*)
|   |   |-- lazy_static feature "default" (*)
|   |   |-- http-body feature "default"
|   |   |   `-- http-body v0.4.4
|   |   |       |-- bytes feature "default" (*)
|   |   |       |-- pin-project-lite feature "default" (*)
|   |   |       `-- http feature "default" (*)
|   |   |-- hyper feature "client"
|   |   |   `-- hyper v0.14.18
|   |   |       |-- futures-core v0.3.21
|   |   |       |-- futures-util v0.3.21 (*)
|   |   |       |-- bytes feature "default" (*)
|   |   |       |-- socket2 feature "default" (*)
|   |   |       |-- pin-project-lite feature "default" (*)
|   |   |       |-- h2 feature "default" (*)
|   |   |       |-- http feature "default" (*)
|   |   |       |-- itoa feature "default" (*)
|   |   |       |-- tokio feature "default" (*)
|   |   |       |-- tokio feature "sync" (*)
|   |   |       |-- tracing feature "std" (*)
|   |   |       |-- http-body feature "default" (*)
|   |   |       |-- futures-channel feature "default"
|   |   |       |   |-- futures-channel v0.3.21
|   |   |       |   |   `-- futures-core v0.3.21
|   |   |       |   `-- futures-channel feature "std"
|   |   |       |       |-- futures-channel v0.3.21 (*)
|   |   |       |       |-- futures-core feature "std" (*)
|   |   |       |       `-- futures-channel feature "alloc"
|   |   |       |           |-- futures-channel v0.3.21 (*)
|   |   |       |           `-- futures-core feature "alloc" (*)
|   |   |       |-- httparse feature "default"
|   |   |       |   |-- httparse v1.7.0
|   |   |       |   `-- httparse feature "std"
|   |   |       |       `-- httparse v1.7.0
|   |   |       |-- httpdate feature "default"
|   |   |       |   `-- httpdate v1.0.2
|   |   |       |-- tower-service feature "default"
|   |   |       |   `-- tower-service v0.3.1
|   |   |       `-- want feature "default"
|   |   |           `-- want v0.3.0
|   |   |               |-- log feature "default" (*)
|   |   |               `-- try-lock feature "default"
|   |   |                   `-- try-lock v0.2.3
|   |   |-- hyper feature "http1"
|   |   |   `-- hyper v0.14.18 (*)
|   |   |-- hyper feature "http2"
|   |   |   |-- hyper v0.14.18 (*)
|   |   |   `-- hyper feature "h2"
|   |   |       `-- hyper v0.14.18 (*)
|   |   |-- hyper feature "runtime"
|   |   |   |-- hyper v0.14.18 (*)
|   |   |   |-- tokio feature "rt"
|   |   |   |   `-- tokio v1.17.0 (*)
|   |   |   |-- tokio feature "time" (*)
|   |   |   `-- hyper feature "tcp"
|   |   |       |-- hyper v0.14.18 (*)
|   |   |       |-- tokio feature "net" (*)
|   |   |       |-- tokio feature "rt" (*)
|   |   |       |-- tokio feature "time" (*)
|   |   |       `-- hyper feature "socket2"
|   |   |           `-- hyper v0.14.18 (*)
|   |   |-- hyper feature "tcp" (*)
|   |   |-- hyper-tls feature "default"
|   |   |   `-- hyper-tls v0.5.0
|   |   |       |-- bytes feature "default" (*)
|   |   |       |-- tokio feature "default" (*)
|   |   |       |-- hyper feature "client" (*)
|   |   |       |-- hyper feature "tcp" (*)
|   |   |       |-- native-tls feature "default"
|   |   |       |   `-- native-tls v0.2.10
|   |   |       |       |-- openssl-sys feature "default" (*)
|   |   |       |       |-- openssl-probe feature "default" (*)
|   |   |       |       |-- log feature "default" (*)
|   |   |       |       `-- openssl feature "default"
|   |   |       |           `-- openssl v0.10.38
|   |   |       |               |-- cfg-if feature "default" (*)
|   |   |       |               |-- libc feature "default" (*)
|   |   |       |               |-- openssl-sys feature "default" (*)
|   |   |       |               |-- bitflags feature "default"
|   |   |       |               |   `-- bitflags v1.3.2
|   |   |       |               |-- foreign-types feature "default"
|   |   |       |               |   `-- foreign-types v0.3.2
|   |   |       |               |       `-- foreign-types-shared feature "default"
|   |   |       |               |           `-- foreign-types-shared v0.1.1
|   |   |       |               `-- once_cell feature "default"
|   |   |       |                   |-- once_cell v1.10.0
|   |   |       |                   `-- once_cell feature "std"
|   |   |       |                       |-- once_cell v1.10.0
|   |   |       |                       `-- once_cell feature "alloc"
|   |   |       |                           |-- once_cell v1.10.0
|   |   |       |                           `-- once_cell feature "race"
|   |   |       |                               `-- once_cell v1.10.0
|   |   |       `-- tokio-native-tls feature "default"
|   |   |           `-- tokio-native-tls v0.3.0
|   |   |               |-- tokio feature "default" (*)
|   |   |               `-- native-tls feature "default" (*)
|   |   |-- native-tls feature "default" (*)
|   |   |-- tokio-native-tls feature "default" (*)
|   |   |-- ipnet feature "default"
|   |   |   `-- ipnet v2.5.0
|   |   |-- mime feature "default"
|   |   |   `-- mime v0.3.16
|   |   |-- percent-encoding feature "default"
|   |   |   `-- percent-encoding v2.1.0
|   |   |-- serde feature "default"
|   |   |   |-- serde v1.0.136
|   |   |   `-- serde feature "std"
|   |   |       `-- serde v1.0.136
|   |   |-- serde_urlencoded feature "default"
|   |   |   `-- serde_urlencoded v0.7.1
|   |   |       |-- itoa feature "default" (*)
|   |   |       |-- serde feature "default" (*)
|   |   |       |-- form_urlencoded feature "default"
|   |   |       |   `-- form_urlencoded v1.0.1
|   |   |       |       |-- percent-encoding feature "default" (*)
|   |   |       |       `-- matches feature "default"
|   |   |       |           `-- matches v0.1.9
|   |   |       `-- ryu feature "default"
|   |   |           `-- ryu v1.0.9
|   |   `-- url feature "default"
|   |       `-- url v2.2.2
|   |           |-- percent-encoding feature "default" (*)
|   |           |-- form_urlencoded feature "default" (*)
|   |           |-- matches feature "default" (*)
|   |           `-- idna feature "default"
|   |               `-- idna v0.2.3
|   |                   |-- matches feature "default" (*)
|   |                   |-- unicode-bidi feature "default"
|   |                   |   |-- unicode-bidi v0.3.7
|   |                   |   `-- unicode-bidi feature "std"
|   |                   |       `-- unicode-bidi v0.3.7
|   |                   `-- unicode-normalization feature "default"
|   |                       |-- unicode-normalization v0.1.19
|   |                       |   |-- tinyvec feature "alloc"
|   |                       |   |   |-- tinyvec v1.5.1
|   |                       |   |   |   `-- tinyvec_macros feature "default"
|   |                       |   |   |       `-- tinyvec_macros v0.1.0
|   |                       |   |   `-- tinyvec feature "tinyvec_macros"
|   |                       |   |       `-- tinyvec v1.5.1 (*)
|   |                       |   `-- tinyvec feature "default"
|   |                       |       `-- tinyvec v1.5.1 (*)
|   |                       `-- unicode-normalization feature "std"
|   |                           `-- unicode-normalization v0.1.19 (*)
|   `-- reqwest feature "default-tls"
|       |-- reqwest v0.11.10 (*)
|       |-- reqwest feature "__tls"
|       |   `-- reqwest v0.11.10 (*)
|       |-- reqwest feature "hyper-tls"
|       |   `-- reqwest v0.11.10 (*)
|       |-- reqwest feature "native-tls-crate"
|       |   `-- reqwest v0.11.10 (*)
|       `-- reqwest feature "tokio-native-tls"
|           `-- reqwest v0.11.10 (*)
|-- tokio feature "default" (*)
|-- tokio feature "macros"
|   |-- tokio v1.17.0 (*)
|   `-- tokio feature "tokio-macros"
|       `-- tokio v1.17.0 (*)
|-- tokio feature "rt" (*)
|-- tokio feature "rt-multi-thread"
|   |-- tokio v1.17.0 (*)
|   |-- tokio feature "num_cpus"
|   |   `-- tokio v1.17.0 (*)
|   `-- tokio feature "rt" (*)
`-- serde_json feature "default"
    |-- serde_json v1.0.79
    |   |-- serde v1.0.136
    |   |-- itoa feature "default" (*)
    |   `-- ryu feature "default" (*)
    `-- serde_json feature "std"
        |-- serde_json v1.0.79 (*)
        `-- serde feature "std" (*)

Cargo.toml is

[package]
name = "decrypting-download"
version = "0.1.0"
edition = "2018"

[[bin]]
path= "src/curl.rs"
name="download-curl"

[[bin]]
path="src/reqwest.rs"
name="download-reqwest"

[[bin]]
path="src/multi-reqwest.rs"
name="download-multi-reqwest"

[dependencies]

#chacha20= {version="0.8.1"}
chacha20 = "*"
#cipher = {version="0.3.0", default-features=false}
cipher = "*"

curl="*"

reqwest="*"
bytes="*"
tokio= { version="*", features=["macros", "rt", "rt-multi-thread"] }

serde_json = "*"
regex="*"

reqwest.rs is

use bytes::Bytes;
use reqwest::get;
use std::env::args;
use std::error::Error;

mod common;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    println!("Hello, world!");

    let mut args = args();
    let url = match args.next() {
        None => "http://192.168.1.2:8252/moisture".into(),
        Some(url) => url,
    };

    let body = get_payload(&url).await?;

    let key = [0x42; 32];
    let decrypted = common::NonceAndPayload::new(|x| common::chacha20_factory(x, &key))
        .absorb(&body)
        .unwrap();

    let message = String::from_utf8(decrypted);
    println!("{:?}", message);
    Ok(())
}

async fn get_payload(url: &str) -> Result<Bytes, reqwest::Error> {
    let body = get(url).await?.bytes().await?;
    Ok(body)
}

common.rs is

use chacha20::ChaCha20;
use cipher::{KeyIvInit, StreamCipher, StreamCipherError};

pub enum NonceAndPayload<C, F>
where
    F: Fn(&mut Vec<u8>) -> Option<C>,
    C: StreamCipher,
{
    ScanningForNonce(Vec<u8>, F),
    Streaming(C),
}

impl<C, F> NonceAndPayload<C, F>
where
    F: Fn(&mut Vec<u8>) -> Option<C>,
    C: StreamCipher,
{
    pub fn new(factory: F) -> Self {
        Self::ScanningForNonce(vec![], factory)
    }

    pub fn absorb(&mut self, payload: &[u8]) -> Result<Vec<u8>, StreamCipherError> {
        // println!("absorb");
        let rval = match self {
            NonceAndPayload::ScanningForNonce(buffer, factory) => {
                // println!("scanning");
                buffer.extend_from_slice(payload);
                let cipher = factory(buffer);
                match cipher {
                    None => vec![],
                    Some(mut cipher) => {
                        let mut out = vec![0; buffer.len()];
                        cipher.apply_keystream_b2b(buffer, &mut out)?;
                        *self = Self::Streaming(cipher);
                        out
                    }
                }
            }
            NonceAndPayload::Streaming(cipher) => {
                // println!("streaming");
                let mut out = vec![0; payload.len()];
                cipher.apply_keystream_b2b(payload, &mut out)?;
                out
            }
        };
        Ok(rval)
    }
}

pub fn chacha20_factory(buffer: &mut Vec<u8>, key: &[u8; 32]) -> Option<ChaCha20> {
    if buffer.len() >= 12 {
        let nonce = buffer.drain(0..12).collect::<Vec<_>>();
        // println!("nonce = {:?}", &nonce);

        let nonce: &chacha20::Nonce = nonce.as_slice().into();
        Some(ChaCha20::new(key.into(), nonce))
    } else {
        None
    }
}

Cargo.lock is

# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3

[[package]]
name = "aho-corasick"
version = "0.7.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
dependencies = [
 "memchr",
]

[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"

[[package]]
name = "base64"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"

[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"

[[package]]
name = "bumpalo"
version = "3.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899"

[[package]]
name = "bytes"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"

[[package]]
name = "cc"
version = "1.0.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"

[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "chacha20"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7fc89c7c5b9e7a02dfe45cd2367bae382f9ed31c61ca8debe5f827c420a2f08"
dependencies = [
 "cfg-if",
 "cipher",
 "cpufeatures",
]

[[package]]
name = "cipher"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e"
dependencies = [
 "crypto-common",
 "inout",
]

[[package]]
name = "core-foundation"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
dependencies = [
 "core-foundation-sys",
 "libc",
]

[[package]]
name = "core-foundation-sys"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"

[[package]]
name = "cpufeatures"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b"
dependencies = [
 "libc",
]

[[package]]
name = "crypto-common"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8"
dependencies = [
 "generic-array",
 "typenum",
]

[[package]]
name = "curl"
version = "0.4.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37d855aeef205b43f65a5001e0997d81f8efca7badad4fad7d897aa7f0d0651f"
dependencies = [
 "curl-sys",
 "libc",
 "openssl-probe",
 "openssl-sys",
 "schannel",
 "socket2",
 "winapi",
]

[[package]]
name = "curl-sys"
version = "0.4.53+curl-7.82.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8092905a5a9502c312f223b2775f57ec5c5b715f9a15ee9d2a8591d1364a0352"
dependencies = [
 "cc",
 "libc",
 "libz-sys",
 "openssl-sys",
 "pkg-config",
 "vcpkg",
 "winapi",
]

[[package]]
name = "decrypting-download"
version = "0.1.0"
dependencies = [
 "bytes",
 "chacha20",
 "cipher",
 "curl",
 "regex",
 "reqwest",
 "serde_json",
 "tokio",
]

[[package]]
name = "encoding_rs"
version = "0.8.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b"
dependencies = [
 "cfg-if",
]

[[package]]
name = "fastrand"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf"
dependencies = [
 "instant",
]

[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"

[[package]]
name = "foreign-types"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
dependencies = [
 "foreign-types-shared",
]

[[package]]
name = "foreign-types-shared"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"

[[package]]
name = "form_urlencoded"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
dependencies = [
 "matches",
 "percent-encoding",
]

[[package]]
name = "futures-channel"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010"
dependencies = [
 "futures-core",
]

[[package]]
name = "futures-core"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3"

[[package]]
name = "futures-sink"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868"

[[package]]
name = "futures-task"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a"

[[package]]
name = "futures-util"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a"
dependencies = [
 "futures-core",
 "futures-task",
 "pin-project-lite",
 "pin-utils",
]

[[package]]
name = "generic-array"
version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803"
dependencies = [
 "typenum",
 "version_check",
]

[[package]]
name = "h2"
version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57"
dependencies = [
 "bytes",
 "fnv",
 "futures-core",
 "futures-sink",
 "futures-util",
 "http",
 "indexmap",
 "slab",
 "tokio",
 "tokio-util",
 "tracing",
]

[[package]]
name = "hashbrown"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"

[[package]]
name = "hermit-abi"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
 "libc",
]

[[package]]
name = "http"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03"
dependencies = [
 "bytes",
 "fnv",
 "itoa",
]

[[package]]
name = "http-body"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6"
dependencies = [
 "bytes",
 "http",
 "pin-project-lite",
]

[[package]]
name = "httparse"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6330e8a36bd8c859f3fa6d9382911fbb7147ec39807f63b923933a247240b9ba"

[[package]]
name = "httpdate"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"

[[package]]
name = "hyper"
version = "0.14.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2"
dependencies = [
 "bytes",
 "futures-channel",
 "futures-core",
 "futures-util",
 "h2",
 "http",
 "http-body",
 "httparse",
 "httpdate",
 "itoa",
 "pin-project-lite",
 "socket2",
 "tokio",
 "tower-service",
 "tracing",
 "want",
]

[[package]]
name = "hyper-tls"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
dependencies = [
 "bytes",
 "hyper",
 "native-tls",
 "tokio",
 "tokio-native-tls",
]

[[package]]
name = "idna"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
dependencies = [
 "matches",
 "unicode-bidi",
 "unicode-normalization",
]

[[package]]
name = "indexmap"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"
dependencies = [
 "autocfg",
 "hashbrown",
]

[[package]]
name = "inout"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
dependencies = [
 "generic-array",
]

[[package]]
name = "instant"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
dependencies = [
 "cfg-if",
]

[[package]]
name = "ipnet"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"

[[package]]
name = "itoa"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"

[[package]]
name = "js-sys"
version = "0.3.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397"
dependencies = [
 "wasm-bindgen",
]

[[package]]
name = "lazy_static"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"

[[package]]
name = "libc"
version = "0.2.124"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50"

[[package]]
name = "libz-sys"
version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f35facd4a5673cb5a48822be2be1d4236c1c99cb4113cab7061ac720d5bf859"
dependencies = [
 "cc",
 "libc",
 "pkg-config",
 "vcpkg",
]

[[package]]
name = "log"
version = "0.4.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8"
dependencies = [
 "cfg-if",
]

[[package]]
name = "matches"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"

[[package]]
name = "memchr"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"

[[package]]
name = "mime"
version = "0.3.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"

[[package]]
name = "mio"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9"
dependencies = [
 "libc",
 "log",
 "miow",
 "ntapi",
 "wasi",
 "winapi",
]

[[package]]
name = "miow"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
dependencies = [
 "winapi",
]

[[package]]
name = "native-tls"
version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9"
dependencies = [
 "lazy_static",
 "libc",
 "log",
 "openssl",
 "openssl-probe",
 "openssl-sys",
 "schannel",
 "security-framework",
 "security-framework-sys",
 "tempfile",
]

[[package]]
name = "ntapi"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f"
dependencies = [
 "winapi",
]

[[package]]
name = "num_cpus"
version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
dependencies = [
 "hermit-abi",
 "libc",
]

[[package]]
name = "once_cell"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"

[[package]]
name = "openssl"
version = "0.10.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95"
dependencies = [
 "bitflags",
 "cfg-if",
 "foreign-types",
 "libc",
 "once_cell",
 "openssl-sys",
]

[[package]]
name = "openssl-probe"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"

[[package]]
name = "openssl-sys"
version = "0.9.72"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb"
dependencies = [
 "autocfg",
 "cc",
 "libc",
 "pkg-config",
 "vcpkg",
]

[[package]]
name = "percent-encoding"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"

[[package]]
name = "pin-project-lite"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"

[[package]]
name = "pin-utils"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"

[[package]]
name = "pkg-config"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"

[[package]]
name = "proc-macro2"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1"
dependencies = [
 "unicode-xid",
]

[[package]]
name = "quote"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
dependencies = [
 "proc-macro2",
]

[[package]]
name = "redox_syscall"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
dependencies = [
 "bitflags",
]

[[package]]
name = "regex"
version = "1.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
dependencies = [
 "aho-corasick",
 "memchr",
 "regex-syntax",
]

[[package]]
name = "regex-syntax"
version = "0.6.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"

[[package]]
name = "remove_dir_all"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
dependencies = [
 "winapi",
]

[[package]]
name = "reqwest"
version = "0.11.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb"
dependencies = [
 "base64",
 "bytes",
 "encoding_rs",
 "futures-core",
 "futures-util",
 "h2",
 "http",
 "http-body",
 "hyper",
 "hyper-tls",
 "ipnet",
 "js-sys",
 "lazy_static",
 "log",
 "mime",
 "native-tls",
 "percent-encoding",
 "pin-project-lite",
 "serde",
 "serde_json",
 "serde_urlencoded",
 "tokio",
 "tokio-native-tls",
 "url",
 "wasm-bindgen",
 "wasm-bindgen-futures",
 "web-sys",
 "winreg",
]

[[package]]
name = "ryu"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"

[[package]]
name = "schannel"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75"
dependencies = [
 "lazy_static",
 "winapi",
]

[[package]]
name = "security-framework"
version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc"
dependencies = [
 "bitflags",
 "core-foundation",
 "core-foundation-sys",
 "libc",
 "security-framework-sys",
]

[[package]]
name = "security-framework-sys"
version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556"
dependencies = [
 "core-foundation-sys",
 "libc",
]

[[package]]
name = "serde"
version = "1.0.136"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"

[[package]]
name = "serde_json"
version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95"
dependencies = [
 "itoa",
 "ryu",
 "serde",
]

[[package]]
name = "serde_urlencoded"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
dependencies = [
 "form_urlencoded",
 "itoa",
 "ryu",
 "serde",
]

[[package]]
name = "slab"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32"

[[package]]
name = "socket2"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
dependencies = [
 "libc",
 "winapi",
]

[[package]]
name = "syn"
version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d"
dependencies = [
 "proc-macro2",
 "quote",
 "unicode-xid",
]

[[package]]
name = "tempfile"
version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
dependencies = [
 "cfg-if",
 "fastrand",
 "libc",
 "redox_syscall",
 "remove_dir_all",
 "winapi",
]

[[package]]
name = "tinyvec"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2"
dependencies = [
 "tinyvec_macros",
]

[[package]]
name = "tinyvec_macros"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"

[[package]]
name = "tokio"
version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee"
dependencies = [
 "bytes",
 "libc",
 "memchr",
 "mio",
 "num_cpus",
 "pin-project-lite",
 "socket2",
 "tokio-macros",
 "winapi",
]

[[package]]
name = "tokio-macros"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7"
dependencies = [
 "proc-macro2",
 "quote",
 "syn",
]

[[package]]
name = "tokio-native-tls"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
dependencies = [
 "native-tls",
 "tokio",
]

[[package]]
name = "tokio-util"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764"
dependencies = [
 "bytes",
 "futures-core",
 "futures-sink",
 "pin-project-lite",
 "tokio",
 "tracing",
]

[[package]]
name = "tower-service"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"

[[package]]
name = "tracing"
version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09"
dependencies = [
 "cfg-if",
 "pin-project-lite",
 "tracing-attributes",
 "tracing-core",
]

[[package]]
name = "tracing-attributes"
version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b"
dependencies = [
 "proc-macro2",
 "quote",
 "syn",
]

[[package]]
name = "tracing-core"
version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f"
dependencies = [
 "lazy_static",
]

[[package]]
name = "try-lock"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"

[[package]]
name = "typenum"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"

[[package]]
name = "unicode-bidi"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f"

[[package]]
name = "unicode-normalization"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
dependencies = [
 "tinyvec",
]

[[package]]
name = "unicode-xid"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"

[[package]]
name = "url"
version = "2.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
dependencies = [
 "form_urlencoded",
 "idna",
 "matches",
 "percent-encoding",
]

[[package]]
name = "vcpkg"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"

[[package]]
name = "version_check"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"

[[package]]
name = "want"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
dependencies = [
 "log",
 "try-lock",
]

[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"

[[package]]
name = "wasm-bindgen"
version = "0.2.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad"
dependencies = [
 "cfg-if",
 "wasm-bindgen-macro",
]

[[package]]
name = "wasm-bindgen-backend"
version = "0.2.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4"
dependencies = [
 "bumpalo",
 "lazy_static",
 "log",
 "proc-macro2",
 "quote",
 "syn",
 "wasm-bindgen-shared",
]

[[package]]
name = "wasm-bindgen-futures"
version = "0.4.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2"
dependencies = [
 "cfg-if",
 "js-sys",
 "wasm-bindgen",
 "web-sys",
]

[[package]]
name = "wasm-bindgen-macro"
version = "0.2.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5"
dependencies = [
 "quote",
 "wasm-bindgen-macro-support",
]

[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b"
dependencies = [
 "proc-macro2",
 "quote",
 "syn",
 "wasm-bindgen-backend",
 "wasm-bindgen-shared",
]

[[package]]
name = "wasm-bindgen-shared"
version = "0.2.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744"

[[package]]
name = "web-sys"
version = "0.3.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283"
dependencies = [
 "js-sys",
 "wasm-bindgen",
]

[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
 "winapi-i686-pc-windows-gnu",
 "winapi-x86_64-pc-windows-gnu",
]

[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"

[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"

[[package]]
name = "winreg"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
dependencies = [
 "winapi",
]

The problem evaporated after a cargo update, but there may be other old apps with a Cargo.lock that triggers this problem.

Darksonn commented 2 years ago

We can't do anything about problems in old releases, so there's nothing to do here. This isn't an issue in the newest release.

matthiasg commented 6 months ago

@Darksonn i have this just now..

error[E0433]: failed to resolve: use of undeclared crate or module tracing --> /Users/mgt/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/sync/rwlock.rs:432:7 | 432 | #[tracing::instrument] | ^^^^^^^ use of undeclared crate or module tracing

Darksonn commented 6 months ago

It looks like you have accidentally modified your local copy of Tokio, because this is how the relevant line of code looks in version 1.37.0 of Tokio:

https://github.com/tokio-rs/tokio/blob/9c337ca1a306be38e3474082be14bdef4bcb45b5/tokio/src/sync/rwlock.rs#L430-L434

I recommend that you delete the tokio-1.37.0 folder in your registry index and let cargo redownload it.

matthiasg commented 6 months ago

@Darksonn i am not aware of changing anything manually in .cargo (how would I?).

Last thing i changed was adding a .cargo/config.toml and ran cargo clean.

But I just came back here anyway to report that deleting the entire cargo registry fixed the issue, so now i just have to find out how that file could have been changed. Thanks

Darksonn commented 6 months ago

I've sometimes seen people modify their registry accidentally when they go-to-definition in their IDE. That might be what happened.

FrankReh commented 6 months ago

I've sometimes seen people modify their registry accidentally when they go-to-definition in their IDE. That might be what happened.

Yup. Happened to me for another repo just yesterday.

matthiasg commented 6 months ago

cargo should make those files readonly by default