1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-07-02 12:44:34 +02:00

Check code with rustfmt not to introduce format commits (#88)

This commit is contained in:
Yuki Okushi
2020-07-21 03:51:51 +09:00
committed by GitHub
parent e5fe8d42fa
commit 7e6bdf2eb2
14 changed files with 59 additions and 80 deletions

View File

@ -2,9 +2,7 @@ use std::borrow::Cow;
use std::fmt;
use std::str;
use actix_web::http::header::{
HeaderValue, IntoHeaderValue, InvalidHeaderValue,
};
use actix_web::http::header::{HeaderValue, IntoHeaderValue, InvalidHeaderValue};
use bytes::{BufMut, BytesMut};
use crate::headers::authorization::errors::ParseError;
@ -80,10 +78,7 @@ impl Scheme for Basic {
}
})?;
Ok(Basic {
user_id,
password,
})
Ok(Basic { user_id, password })
}
}
@ -133,8 +128,7 @@ mod tests {
#[test]
fn test_parse_header() {
let value =
HeaderValue::from_static("Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==");
let value = HeaderValue::from_static("Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==");
let scheme = Basic::parse(&value);
assert!(scheme.is_ok());