Skip to content

Commit 2d335ea

Browse files
authored
feat: implement conversion from libcookie to poem cookie (#898)
1 parent 4d57961 commit 2d335ea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

poem/src/web/cookie.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,12 @@ impl<'a> FromRequest<'a> for Cookie {
328328
}
329329
}
330330

331+
impl From<libcookie::Cookie<'static>> for Cookie {
332+
fn from(value: libcookie::Cookie<'static>) -> Self {
333+
Self(value)
334+
}
335+
}
336+
331337
/// A collection of cookies that tracks its modifications.
332338
///
333339
/// # Example

0 commit comments

Comments
 (0)