twilight-rs / twilight

Powerful, flexible, and scalable ecosystem of Rust libraries for the Discord API.
https://discord.gg/twilight-rs
ISC License
652 stars 130 forks source link

Lavalink broken in 0.16 rc #2319

Closed LinuxDevon closed 5 months ago

LinuxDevon commented 5 months ago

Capitalization in a header is illegal and causes the bot to panic. I posted in discord and figured it out shortly after. https://docs.rs/http/latest/http/header/struct.HeaderName.html#method.from_static

Panics This function panics when the static string is a invalid header.

Until Allow panicking in constants makes its way into stable, the panic message at > compile-time is going to look cryptic, but should at least point at your header value:

Steps to reproduce:

  1. checkout latest branch
  2. startup a 3.X.Y lavalink server locally
  3. build example lavalink-basic-bot

It would panic immediately on connect. See attached log of the panic. backtrace.log