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:
Michael Kovalchik
2015-01-01 19:51:14 -05:00
committed by Sean McArthur
parent 6ecb39e910
commit 5dd4529165
3 changed files with 4 additions and 4 deletions

View File

@@ -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))