Skip to content

Commit 34e87a6

Browse files
committed
fix: satisfy clippy
Signed-off-by: Richard Zak <[email protected]>
1 parent db3cc5e commit 34e87a6

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

crates/server/src/trees/put.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub async fn put(
5757
.extract::<BodyStream>()
5858
.await
5959
.map_err(|e| (StatusCode::BAD_REQUEST, e).into_response())?
60-
.map_err(|e| io::Error::new(io::ErrorKind::Other, e));
60+
.map_err(io::Error::other);
6161
tag.create_file_node(&cx.path, meta, body.into_async_read())
6262
.await
6363
}

crates/type/src/tag/entry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ use serde::{Deserialize, Serialize};
99
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
1010
#[serde(untagged)]
1111
pub enum Entry<E = TreeEntry> {
12-
Signed(Jws),
12+
Signed(Box<Jws>),
1313
Unsigned(E),
1414
}

crates/type/src/tree/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,7 @@ impl<F> Tree<F> {
7878
dir: impl Borrow<Directory<E>>,
7979
) -> std::io::Result<Entry<Content<F>>> {
8080
let buf = serde_json::to_vec(dir.borrow()).map_err(|e| {
81-
std::io::Error::new(
82-
std::io::ErrorKind::Other,
83-
format!("failed to encode directory to JSON: {e}",),
84-
)
81+
std::io::Error::other(format!("failed to encode directory to JSON: {e}",))
8582
})?;
8683
let (size, hash) = Algorithms::default().read_sync(&buf[..])?;
8784
Ok(Entry {

0 commit comments

Comments
 (0)