Add Const fn's
This commit is contained in:
parent
74b150b1f3
commit
2b8abfcc9a
1 changed files with 3 additions and 3 deletions
|
@ -132,8 +132,8 @@ impl Default for CookieStoreMutex {
|
|||
|
||||
impl CookieStoreMutex {
|
||||
/// Create a new [`CookieStoreMutex`] from an existing [`cookie_store::CookieStore`].
|
||||
pub fn new(cookie_store: CookieStore) -> CookieStoreMutex {
|
||||
CookieStoreMutex(Mutex::new(cookie_store))
|
||||
pub const fn new(cookie_store: CookieStore) -> CookieStoreMutex {
|
||||
CookieStoreMutex(Mutex::const_new(cookie_store))
|
||||
}
|
||||
|
||||
/// Lock and get a handle to the contained [`cookie_store::CookieStore`].
|
||||
|
@ -175,7 +175,7 @@ impl Default for CookieStoreRwLock {
|
|||
|
||||
impl CookieStoreRwLock {
|
||||
/// Create a new [`CookieStoreRwLock`] from an existing [`cookie_store::CookieStore`].
|
||||
pub fn new(cookie_store: CookieStore) -> CookieStoreRwLock {
|
||||
pub const fn new(cookie_store: CookieStore) -> CookieStoreRwLock {
|
||||
CookieStoreRwLock(RwLock::new(cookie_store))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue