Skip to content

Commit 90d51de

Browse files
committed
refactor: rustfmt linting
1 parent 7b5eedc commit 90d51de

File tree

6 files changed

+22
-8
lines changed

6 files changed

+22
-8
lines changed

buffer-plz/src/cursor.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ pub struct Cursor<'a> {
99

1010
impl<'a> Cursor<'a> {
1111
pub fn new(inner: &'a mut BytesMut) -> Self {
12-
Cursor { inner, pos: 0 }
12+
Cursor {
13+
inner,
14+
pos: 0,
15+
}
1316
}
1417

1518
pub fn into_inner(&mut self) -> BytesMut {

decompression-plz/src/decompression/multi/error.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ impl MultiDecompressError {
1414
reason: MultiDecompressErrorReason,
1515
error: DecompressError,
1616
) -> Self {
17-
MultiDecompressError { reason, error }
17+
MultiDecompressError {
18+
reason,
19+
error,
20+
}
1821
}
1922
}
2023

header-plz/src/message_head/header_map/header/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ pub struct Header {
1515

1616
impl Header {
1717
pub fn new(key: BytesMut, value: BytesMut) -> Self {
18-
Header { key, value }
18+
Header {
19+
key,
20+
value,
21+
}
1922
}
2023

2124
pub fn into_bytes(mut self) -> BytesMut {

header-plz/src/message_head/header_map/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ pub struct HeaderMap {
1818

1919
impl HeaderMap {
2020
pub fn new(headers: Vec<Header>, crlf: BytesMut) -> Self {
21-
HeaderMap { headers, crlf }
21+
HeaderMap {
22+
headers,
23+
crlf,
24+
}
2225
}
2326

2427
pub fn into_bytes(mut self) -> BytesMut {

mime-plz/build.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ use std::io::Write;
88

99
use serde_json::Value;
1010

11-
const LABELS: [&str; 8] = [
12-
"APP", "AUDIO", "FONT", "IMAGE", "MESSAGE", "MODEL", "TEXT", "VIDEO",
13-
];
11+
const LABELS: [&str; 8] =
12+
["APP", "AUDIO", "FONT", "IMAGE", "MESSAGE", "MODEL", "TEXT", "VIDEO"];
1413

1514
fn main() {
1615
println!("cargo:rerun-if-changed=./artifacts/db.json");

uri-plz/src/query.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ pub struct Query {
1010

1111
impl Query {
1212
fn new(qmark: BytesMut, kv_pair: Option<Vec<QueryKvPair>>) -> Self {
13-
Query { qmark, kv_pair }
13+
Query {
14+
qmark,
15+
kv_pair,
16+
}
1417
}
1518

1619
pub fn parse(mut input: BytesMut) -> Option<Self> {

0 commit comments

Comments
 (0)