We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
from_cookie_jar
1 parent 26eae86 commit c53be8cCopy full SHA for c53be8c
src/header/common/cookie.rs
@@ -74,7 +74,7 @@ impl Cookies {
74
75
/// Extracts all cookies from `CookieJar` and creates Cookie header.
76
/// Useful for clients.
77
- pub fn from_cookie_jar(jar: CookieJar) -> Cookies {
+ pub fn from_cookie_jar(jar: &CookieJar) -> Cookies {
78
Cookies(jar.iter().collect())
79
}
80
@@ -107,7 +107,7 @@ fn cookie_jar() {
107
let cookie = Cookie::new("foo".to_string(), "bar".to_string());
108
let cookies = Cookies(vec![cookie]);
109
let jar = cookies.to_cookie_jar(&[]);
110
- let new_cookies = Cookies::from_cookie_jar(jar);
+ let new_cookies = Cookies::from_cookie_jar(&jar);
111
112
assert_eq!(cookies, new_cookies);
113
0 commit comments