Skip to content

Commit

Permalink
thanks clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Sep 5, 2024
1 parent dfbc732 commit b91d909
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gix-packetline-blocking/src/encode/async_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async fn prefixed_data_to_write(prefix: &[u8], data: &[u8], out: impl AsyncWrite

/// Write a `text` message to `out`, which is assured to end in a newline.
pub async fn text_to_write(text: &[u8], out: impl AsyncWrite + Unpin) -> io::Result<usize> {
prefixed_and_suffixed_data_to_write(&[], text, &[b'\n'], out).await
prefixed_and_suffixed_data_to_write(&[], text, b"\n", out).await
}

/// Write a `data` message to `out`.
Expand Down
2 changes: 1 addition & 1 deletion gix-packetline-blocking/src/write/async_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl<T> Writer<T> {
/// If called, each call to [`write()`][io::Write::write()] will write the input as text, appending a trailing newline
/// if needed before writing.
pub fn enable_text_mode(&mut self) {
self.inner.suffix = &[b'\n'];
self.inner.suffix = b"\n";
}
}

Expand Down
2 changes: 1 addition & 1 deletion gix-packetline/src/encode/async_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async fn prefixed_data_to_write(prefix: &[u8], data: &[u8], out: impl AsyncWrite

/// Write a `text` message to `out`, which is assured to end in a newline.
pub async fn text_to_write(text: &[u8], out: impl AsyncWrite + Unpin) -> io::Result<usize> {
prefixed_and_suffixed_data_to_write(&[], text, &[b'\n'], out).await
prefixed_and_suffixed_data_to_write(&[], text, b"\n", out).await
}

/// Write a `data` message to `out`.
Expand Down
2 changes: 1 addition & 1 deletion gix-packetline/src/write/async_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl<T> Writer<T> {
/// If called, each call to [`write()`][io::Write::write()] will write the input as text, appending a trailing newline
/// if needed before writing.
pub fn enable_text_mode(&mut self) {
self.inner.suffix = &[b'\n'];
self.inner.suffix = b"\n";
}
}

Expand Down

0 comments on commit b91d909

Please sign in to comment.