Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

Commit a89ce4b

Browse files
Joonas Koivunenaphelionz
authored andcommitted
chore: cargo fmt missing from master
1 parent 771f376 commit a89ce4b

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

http/src/v0/block.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ pub struct GetQuery {
1010
arg: String,
1111
}
1212

13-
async fn get_query<T: IpfsTypes>(
14-
ipfs: Ipfs<T>,
15-
query: GetQuery,
16-
) -> Result<impl Reply, Rejection> {
13+
async fn get_query<T: IpfsTypes>(ipfs: Ipfs<T>, query: GetQuery) -> Result<impl Reply, Rejection> {
1714
let cid: Cid = query.arg.parse().map_err(StringError::from)?;
1815
let data = ipfs
1916
.get_block(&cid)
@@ -120,10 +117,7 @@ pub struct RmQuery {
120117
#[serde(rename_all = "PascalCase")]
121118
pub struct RmResponse {}
122119

123-
async fn rm_query<T: IpfsTypes>(
124-
ipfs: Ipfs<T>,
125-
query: RmQuery,
126-
) -> Result<impl Reply, Rejection> {
120+
async fn rm_query<T: IpfsTypes>(ipfs: Ipfs<T>, query: RmQuery) -> Result<impl Reply, Rejection> {
127121
let cid: Cid = query.arg.parse().map_err(StringError::from)?;
128122
ipfs.remove_block(&cid).await.map_err(StringError::from)?;
129123
let response = RmResponse {};

http/src/v0/refs.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ async fn inner_local<T: IpfsTypes>(ipfs: Ipfs<T>) -> Result<impl Reply, Rejectio
3737
err: "".to_string(),
3838
})
3939
.map(|response| {
40-
serde_json::to_string(&response).map_err(|e| {
41-
eprintln!("error from serde_json: {}", e);
42-
HandledErr
43-
}).unwrap()
40+
serde_json::to_string(&response)
41+
.map_err(|e| {
42+
eprintln!("error from serde_json: {}", e);
43+
HandledErr
44+
})
45+
.unwrap()
4446
})
4547
.map(|ref_json| Ok(format!("{}{}", ref_json, "\n")))
4648
.collect();

0 commit comments

Comments
 (0)