File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1269,6 +1269,12 @@ impl HeaderName {
1269
1269
i += 1 ;
1270
1270
}
1271
1271
} {
1272
+ // TODO: When msrv is bumped to larger than 1.57, this should be
1273
+ // replaced with `panic!` macro.
1274
+ // https://blog.rust-lang.org/2021/12/02/Rust-1.57.0.html#panic-in-const-contexts
1275
+ //
1276
+ // See the panics section of this method's document for details.
1277
+ #[ allow( clippy:: no_effect) ]
1272
1278
( [ ] as [ u8 ; 0 ] ) [ 0 ] ; // Invalid header name
1273
1279
}
1274
1280
Original file line number Diff line number Diff line change @@ -86,6 +86,12 @@ impl HeaderValue {
86
86
let mut i = 0 ;
87
87
while i < bytes. len ( ) {
88
88
if !is_visible_ascii ( bytes[ i] ) {
89
+ // TODO: When msrv is bumped to larger than 1.57, this should be
90
+ // replaced with `panic!` macro.
91
+ // https://blog.rust-lang.org/2021/12/02/Rust-1.57.0.html#panic-in-const-contexts
92
+ //
93
+ // See the panics section of this method's document for details.
94
+ #[ allow( clippy:: no_effect) ]
89
95
( [ ] as [ u8 ; 0 ] ) [ 0 ] ; // Invalid header value
90
96
}
91
97
i += 1 ;
You can’t perform that action at this time.
0 commit comments