Skip to content

Commit

Permalink
chore: typo & clippy
Browse files Browse the repository at this point in the history
Signed-off-by: suyanhanx <suyanhanx@gmail.com>
  • Loading branch information
suyanhanx committed Mar 7, 2023
1 parent c857d1d commit a3d014e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/services/webhdfs/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,10 @@ impl WebhdfsBackend {
if mkdir_rsp.boolean {
Ok(RpCreate::default())
} else {
return Err(Error::new(
Err(Error::new(
ErrorKind::Unexpected,
&format!("mkdir failed: {path}"),
));
))
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/types/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@ impl Stream for Lister {
let (op, res) = ready!(fut.poll_unpin(cx));
self.pager = Some(op);

match res? {
return match res? {
Some(oes) => {
self.fut = None;
self.buf = oes.into();
return self.poll_next(cx);
self.poll_next(cx)
}
None => {
self.fut = None;
return Poll::Ready(None);
Poll::Ready(None)
}
}
};
}

let mut pager = self.pager.take().expect("pager must be valid");
Expand Down
4 changes: 2 additions & 2 deletions src/types/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ mod tests {
let content = gen_random_bytes();
op.write(path, content.clone())
.await
.expect("writ to object must succeed");
.expect("write to object must succeed");

let mut reader = op.reader(path).await.unwrap();
let mut buf = Vec::new();
Expand All @@ -300,7 +300,7 @@ mod tests {
let content = gen_random_bytes();
op.write(path, content.clone())
.await
.expect("writ to object must succeed");
.expect("write to object must succeed");

let mut reader = op.reader(path).await.unwrap();
let mut buf = Vec::new();
Expand Down

0 comments on commit a3d014e

Please sign in to comment.