1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 18:09:22 +02:00

clippy warnings; extend url_for example in user guide

This commit is contained in:
Nikolay Kim
2018-04-09 13:30:38 -07:00
parent 458e6bdcc2
commit 7df2d6b12a
3 changed files with 36 additions and 30 deletions

View File

@ -131,6 +131,7 @@ fn origin(headers: &HeaderMap) -> Option<Result<Cow<str>, CsrfError>> {
/// .allowed_origin("https://www.example.com"));
/// # }
/// ```
#[derive(Default)]
pub struct CsrfFilter {
origins: HashSet<String>,
allow_xhr: bool,

View File

@ -276,8 +276,8 @@ impl CookieSessionInner {
fn new(key: &[u8], security: CookieSecurity) -> CookieSessionInner {
CookieSessionInner {
security,
key: Key::from_master(key),
security: security,
name: "actix-session".to_owned(),
path: "/".to_owned(),
domain: None,