Skip to content

Commit

Permalink
Don't export Header struct
Browse files Browse the repository at this point in the history
This struct does not need to be exported from the crate because it
is not used in any public fn - it's internal.

This is technically a breaking change, but in practice, not too bad
since the struct is not used by the API.
  • Loading branch information
algesten committed Nov 20, 2023
1 parent 260213b commit a7f058a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl fmt::Display for HeaderLine {
#[derive(Clone, PartialEq, Eq)]
/// Wrapper type for a header field.
/// <https://tools.ietf.org/html/rfc7230#section-3.2>
pub struct Header {
pub(crate) struct Header {
// Line contains the unmodified bytes of single header field.
// It does not contain the final CRLF.
line: HeaderLine,
Expand Down Expand Up @@ -115,6 +115,7 @@ impl Header {
///
/// ureq can't know what encoding the header is in, but this function provides
/// an escape hatch for users that need to handle such headers.
#[cfg(feature = "http-interop")]
pub fn value_raw(&self) -> &[u8] {
let mut bytes = &self.line.as_bytes()[self.index + 1..];

Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ pub use crate::agent::Agent;
pub use crate::agent::AgentBuilder;
pub use crate::agent::RedirectAuthHeaders;
pub use crate::error::{Error, ErrorKind, OrAnyStatus, Transport};
pub use crate::header::Header;
pub use crate::middleware::{Middleware, MiddlewareNext};
pub use crate::proxy::Proxy;
pub use crate::request::{Request, RequestUrl};
Expand Down

0 comments on commit a7f058a

Please sign in to comment.