Skip to content

Commit

Permalink
refactor: fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l authored Dec 18, 2020
1 parent 0707ab1 commit ed0d85f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ pub fn is_exe(name: &str, path: &str) -> bool {
|| (!name.is_empty() && which::which(name).is_ok())
}

/// Helper function to turn an `AsyncRead` to a `Stream`
/// Helper function to turn an `AsyncRead` to a `Stream`.
// See also: https://stackoverflow.com/a/59327560
pub fn into_bytes<R: AsyncRead>(r: R) -> impl Stream<Item = tokio::io::Result<Bytes>> {
FramedRead::new(r, BytesCodec::new()).map_ok(|bytes| bytes.freeze())
Expand Down

0 comments on commit ed0d85f

Please sign in to comment.