mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 01:32:57 +01:00
Param ctor is private
This commit is contained in:
parent
8941557da6
commit
093d0bae40
@ -44,8 +44,8 @@ impl Default for HttpMessage {
|
||||
uri: Uri::default(),
|
||||
version: Version::HTTP_11,
|
||||
headers: HeaderMap::with_capacity(16),
|
||||
params: Params::default(),
|
||||
query: Params::default(),
|
||||
params: Params::new(),
|
||||
query: Params::new(),
|
||||
query_loaded: false,
|
||||
cookies: None,
|
||||
addr: None,
|
||||
@ -106,8 +106,8 @@ impl HttpRequest<()> {
|
||||
uri: uri,
|
||||
version: version,
|
||||
headers: headers,
|
||||
params: Params::default(),
|
||||
query: Params::default(),
|
||||
params: Params::new(),
|
||||
query: Params::new(),
|
||||
query_loaded: false,
|
||||
cookies: None,
|
||||
addr: None,
|
||||
|
@ -24,13 +24,11 @@ pub trait FromParam: Sized {
|
||||
#[derive(Debug)]
|
||||
pub struct Params<'a>(SmallVec<[(Cow<'a, str>, Cow<'a, str>); 3]>);
|
||||
|
||||
impl<'a> Default for Params<'a> {
|
||||
fn default() -> Params<'a> {
|
||||
impl<'a> Params<'a> {
|
||||
|
||||
pub(crate) fn new() -> Params<'a> {
|
||||
Params(SmallVec::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Params<'a> {
|
||||
|
||||
pub(crate) fn clear(&mut self) {
|
||||
self.0.clear();
|
||||
|
@ -264,7 +264,7 @@ impl Default for TestRequest<()> {
|
||||
uri: Uri::from_str("/").unwrap(),
|
||||
version: Version::HTTP_11,
|
||||
headers: HeaderMap::new(),
|
||||
params: Params::default(),
|
||||
params: Params::new(),
|
||||
cookies: None,
|
||||
payload: None,
|
||||
}
|
||||
@ -297,7 +297,7 @@ impl<S> TestRequest<S> {
|
||||
uri: Uri::from_str("/").unwrap(),
|
||||
version: Version::HTTP_11,
|
||||
headers: HeaderMap::new(),
|
||||
params: Params::default(),
|
||||
params: Params::new(),
|
||||
cookies: None,
|
||||
payload: None,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user