Closed rawler closed 1 year ago
Haven't had time to dig into whether HeaderName really is interior-mutable yet, or if clippy is just misdetecting. If it really is correct, I'm guessing the same interior mutability could be detect by compiler when not used as const, preventing some optimizations at compile-time?
Regardess, this right now gets in the way from defining custom HeaderName
as const.
See #599.
Ugh. I thought I search for duplicates.
When augmenting the header constants defined in
http::header
with my own custom header, clippy warns me thatHeaderName
is "interior mutable".const
item should never be interior mutable --> src/my_source.rs:39:1= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const = note:
#[warn(clippy::declare_interior_mutable_const)]
on by default