Skip to content

Commit

Permalink
fix(build): revert unnecessary format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAntix committed Jan 30, 2024
1 parent 5099f28 commit fdb0594
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 156 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": false
}
18 changes: 6 additions & 12 deletions src/builder.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::borrow::{Borrow, BorrowMut, Cow};
use std::borrow::{Cow, Borrow, BorrowMut};

use crate::{Cookie, Expiration, SameSite};
use crate::{Cookie, SameSite, Expiration};

/// Structure that follows the builder pattern for building `Cookie` structs.
///
Expand Down Expand Up @@ -59,13 +59,10 @@ impl<'c> CookieBuilder<'c> {
/// assert_eq!(c.name_value(), ("foo", "bar"));
/// ```
pub fn new<N, V>(name: N, value: V) -> Self
where
N: Into<Cow<'c, str>>,
V: Into<Cow<'c, str>>,
where N: Into<Cow<'c, str>>,
V: Into<Cow<'c, str>>
{
CookieBuilder {
cookie: Cookie::new(name, value),
}
CookieBuilder { cookie: Cookie::new(name, value) }
}

/// Sets the `value` field in the cookie being built.
Expand Down Expand Up @@ -371,10 +368,7 @@ impl<'c> CookieBuilder<'c> {
/// Instead of using this method, pass a `CookieBuilder` directly into
/// methods expecting a `T: Into<Cookie>`. For other cases, use
/// [`CookieBuilder::build()`].
#[deprecated(
since = "0.18.0",
note = "`CookieBuilder` can be passed in to methods expecting a `Cookie`; for other cases, use `CookieBuilder::build()`"
)]
#[deprecated(since="0.18.0", note="`CookieBuilder` can be passed in to methods expecting a `Cookie`; for other cases, use `CookieBuilder::build()`")]
pub fn finish(self) -> Cookie<'c> {
self.cookie
}
Expand Down
Loading

0 comments on commit fdb0594

Please sign in to comment.