Use renamed unsafe_get and concat_vec methods.
Changed calls to unsafe_get to use get_unchecked and calls to concat_vec to use concat to avoid deprecation lints.
This commit is contained in:
committed by
Sean McArthur
parent
6ecb39e910
commit
5dd4529165
@@ -26,7 +26,7 @@ impl<S: Scheme> Header for Authorization<S> {
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<Authorization<S>> {
|
||||
if raw.len() == 1 {
|
||||
match (from_utf8(unsafe { raw[].unsafe_get(0)[] }), Scheme::scheme(None::<S>)) {
|
||||
match (from_utf8(unsafe { raw[].get_unchecked(0)[] }), Scheme::scheme(None::<S>)) {
|
||||
(Ok(header), Some(scheme))
|
||||
if header.starts_with(scheme) && header.len() > scheme.len() + 1 => {
|
||||
header[scheme.len() + 1..].parse::<S>().map(|s| Authorization(s))
|
||||
|
||||
Reference in New Issue
Block a user