|
1 | | -use std::borrow::{Borrow, BorrowMut, Cow}; |
| 1 | +use std::borrow::{Cow, Borrow, BorrowMut}; |
2 | 2 |
|
3 | | -use crate::{Cookie, Expiration, SameSite}; |
| 3 | +use crate::{Cookie, SameSite, Expiration}; |
4 | 4 |
|
5 | 5 | /// Structure that follows the builder pattern for building `Cookie` structs. |
6 | 6 | /// |
@@ -59,13 +59,10 @@ impl<'c> CookieBuilder<'c> { |
59 | 59 | /// assert_eq!(c.name_value(), ("foo", "bar")); |
60 | 60 | /// ``` |
61 | 61 | pub fn new<N, V>(name: N, value: V) -> Self |
62 | | - where |
63 | | - N: Into<Cow<'c, str>>, |
64 | | - V: Into<Cow<'c, str>>, |
| 62 | + where N: Into<Cow<'c, str>>, |
| 63 | + V: Into<Cow<'c, str>> |
65 | 64 | { |
66 | | - CookieBuilder { |
67 | | - cookie: Cookie::new(name, value), |
68 | | - } |
| 65 | + CookieBuilder { cookie: Cookie::new(name, value) } |
69 | 66 | } |
70 | 67 |
|
71 | 68 | /// Sets the `value` field in the cookie being built. |
@@ -371,10 +368,7 @@ impl<'c> CookieBuilder<'c> { |
371 | 368 | /// Instead of using this method, pass a `CookieBuilder` directly into |
372 | 369 | /// methods expecting a `T: Into<Cookie>`. For other cases, use |
373 | 370 | /// [`CookieBuilder::build()`]. |
374 | | - #[deprecated( |
375 | | - since = "0.18.0", |
376 | | - note = "`CookieBuilder` can be passed in to methods expecting a `Cookie`; for other cases, use `CookieBuilder::build()`" |
377 | | - )] |
| 371 | + #[deprecated(since="0.18.0", note="`CookieBuilder` can be passed in to methods expecting a `Cookie`; for other cases, use `CookieBuilder::build()`")] |
378 | 372 | pub fn finish(self) -> Cookie<'c> { |
379 | 373 | self.cookie |
380 | 374 | } |
|
0 commit comments