Skip to content
Merged
Changes from 2 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
4 changes: 2 additions & 2 deletions headers-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ pub trait Header {
/// The name of this header.
fn name() -> &'static HeaderName;

/// Decode this type from an iterator of `HeaderValue`s.
/// Decode this type from an iterator of [`HeaderValue`]s.
fn decode<'i, I>(values: &mut I) -> Result<Self, Error>
where
Self: Sized,
I: Iterator<Item = &'i HeaderValue>;

/// Encode this type to a `HeaderMap`.
/// Encode this type to a [`HeaderValue`].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, well, sorta. The argument is a container of HeaderValues. Normally, it will be an private type that's like an Entry. But since it's generic, unit tests could just pass a Vec<_>.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a detailed document, which would be more helpful.

///
/// This function should be infallible. Any errors converting to a
/// `HeaderValue` should have been caught when parsing or constructing
Expand Down