2bc4 / twitch-hls-client

Minimal CLI client for watching/recording Twitch streams
GNU General Public License v3.0
22 stars 5 forks source link

Build error: `&` without an explicit lifetime name cannot be used here #18

Closed brian6932 closed 8 months ago

brian6932 commented 8 months ago
error: `&` without an explicit lifetime name cannot be used here
  --> src\http.rs:42:23
   |
42 |     const USER_AGENT: &str =
   |                       ^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a fut
ure release!
   = note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010>
note: the lint level is defined here
  --> src\main.rs:2:9
   |
2  | #![deny(warnings)]
   |         ^^^^^^^^
   = note: `#[deny(elided_lifetimes_in_associated_constant)]` implied by `#[deny(warnings)]`
help: use the `'static` lifetime
   |
42 |     const USER_AGENT: &'static str =
   |                        +++++++

error: could not compile `twitch-hls-client` (bin "twitch-hls-client") due to previous error
error: failed to compile `twitch-hls-client v0.5.0 (https://github.com/2bc4/twitch-hls-client#f2849676)`

sysinfo

❯ cargo --version
cargo 1.75.0-nightly (8eb8acbb1 2023-10-17)
❯ rustc --version
rustc 1.75.0-nightly (249624b50 2023-10-20)