Merge pull request #5 from C0D3-M4513R/main-1

Add Const fn's
This commit is contained in:
pfernie 2023-08-28 07:52:59 -04:00 committed by GitHub
commit 1d406a245f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,7 +132,7 @@ impl Default for CookieStoreMutex {
impl CookieStoreMutex {
/// Create a new [`CookieStoreMutex`] from an existing [`cookie_store::CookieStore`].
pub fn new(cookie_store: CookieStore) -> CookieStoreMutex {
pub const fn new(cookie_store: CookieStore) -> CookieStoreMutex {
CookieStoreMutex(Mutex::new(cookie_store))
}
@ -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))
}