Skip to content

Commit 5c7c02e

Browse files
committed
chore: cargo fmt --all
From some newer version of rust.
1 parent 925e4a8 commit 5c7c02e

File tree

3 files changed

+33
-19
lines changed

3 files changed

+33
-19
lines changed

src/cache/cache_control/cache_directive.rs

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,29 @@ impl CacheDirective {
4747
/// Check whether this directive is valid in an HTTP request.
4848
pub fn valid_in_req(&self) -> bool {
4949
use CacheDirective::*;
50-
matches!(self,
51-
MaxAge(_) | MaxStale(_) | MinFresh(_) | NoCache | NoStore | NoTransform
52-
| OnlyIfCached)
50+
matches!(
51+
self,
52+
MaxAge(_) | MaxStale(_) | MinFresh(_) | NoCache | NoStore | NoTransform | OnlyIfCached
53+
)
5354
}
5455

5556
/// Check whether this directive is valid in an HTTP response.
5657
pub fn valid_in_res(&self) -> bool {
5758
use CacheDirective::*;
58-
matches!(self,
59+
matches!(
60+
self,
5961
MustRevalidate
60-
| NoCache
61-
| NoStore
62-
| NoTransform
63-
| Public
64-
| Private
65-
| ProxyRevalidate
66-
| MaxAge(_)
67-
| SMaxAge(_)
68-
| StaleIfError(_)
69-
| StaleWhileRevalidate(_))
62+
| NoCache
63+
| NoStore
64+
| NoTransform
65+
| Public
66+
| Private
67+
| ProxyRevalidate
68+
| MaxAge(_)
69+
| SMaxAge(_)
70+
| StaleIfError(_)
71+
| StaleWhileRevalidate(_)
72+
)
7073
}
7174

7275
/// Create an instance from a string slice.

src/mime/constants.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,23 @@ macro_rules! mime_const {
2020
};
2121

2222
(with_params, $name:ident, $desc:expr, $base:expr, $sub:expr, $is_utf8:expr, $doccomment:expr) => {
23-
mime_const!(doc_expanded, $name, $desc, $base, $sub, $is_utf8,
24-
concat!(
23+
mime_const!(
24+
doc_expanded,
25+
$name,
26+
$desc,
27+
$base,
28+
$sub,
29+
$is_utf8,
30+
concat!(
2531
"Content-Type for ",
2632
$desc,
2733
".\n\n# Mime Type\n\n```text\n",
28-
$base, "/", $sub, $doccomment, "\n```")
34+
$base,
35+
"/",
36+
$sub,
37+
$doccomment,
38+
"\n```"
39+
)
2940
);
3041
};
3142

src/proxies/forwarded.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ mod tests {
545545
assert_eq!(forwarded.forwarded_for(), vec!["client.com"]);
546546
assert_eq!(forwarded.host(), Some("host.com"));
547547
assert_eq!(forwarded.proto(), Some("https"));
548-
assert!(matches!(forwarded, Forwarded{..}));
548+
assert!(matches!(forwarded, Forwarded { .. }));
549549
Ok(())
550550
}
551551

@@ -644,7 +644,7 @@ mod tests {
644644
assert_eq!(forwarded.forwarded_for(), vec!["client"]);
645645
assert_eq!(forwarded.host(), Some("example.com"));
646646
assert_eq!(forwarded.proto(), Some("https"));
647-
assert!(matches!(forwarded, Forwarded{..}));
647+
assert!(matches!(forwarded, Forwarded { .. }));
648648
Ok(())
649649
}
650650

0 commit comments

Comments
 (0)