Skip to content

Commit

Permalink
Format helpers.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Dev committed Feb 16, 2021
1 parent 8b959c9 commit e8e986e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ impl Finalizer for WriteOrDeleteFile {
}

impl Write for WriteOrDeleteFile {
fn poll_write(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8]) -> Poll<io::Result<usize>> {
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<io::Result<usize>> {
Pin::new(&mut self.get_mut().file).poll_write(cx, buf)
}

Expand All @@ -64,9 +68,8 @@ impl Drop for WriteOrDeleteFile {
}

// used by IteratorAdapter
use std::cell::RefCell;
use serde::{Serialize, Serializer};

use std::cell::RefCell;

// helper struct to make iterators serializable
pub struct IteratorAdapter<I>(RefCell<I>);
Expand Down

0 comments on commit e8e986e

Please sign in to comment.