Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comment for Vec<u8> decoding #215

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions ssh-encoding/src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,14 @@ impl<const N: usize> Decode for [u8; N] {
}
}

/// Decodes `Vec<u8>` from `byte[n]` as described in [RFC4251 § 5]:
/// Decodes `Vec<u8>` from `string` as described in [RFC4251 § 5]:
///
/// > A byte represents an arbitrary 8-bit value (octet). Fixed length
/// > data is sometimes represented as an array of bytes, written
/// > `byte[n]`, where n is the number of bytes in the array.
/// > Arbitrary length binary string. Strings are allowed to contain
/// > arbitrary binary data, including null characters and 8-bit
/// > characters. They are stored as a uint32 containing its length
/// > (number of bytes that follow) and zero (= empty string) or more
/// > bytes that are the value of the string. Terminating null
/// > characters are not used.
///
/// [RFC4251 § 5]: https://datatracker.ietf.org/doc/html/rfc4251#section-5
#[cfg(feature = "alloc")]
Expand Down
Loading