Skip to content
Open
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
7 changes: 6 additions & 1 deletion src/header/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ impl HeaderValue {

/// Mark that the header value represents sensitive information.
///
/// This method is `const` to allow marking constants created with
/// [`HeaderValue::from_static`] as sensitive. Note that sensitive values
/// that are embedded into an application are trivial to dump and cannot be
/// considered secure.
///
/// # Examples
///
/// ```
Expand All @@ -311,7 +316,7 @@ impl HeaderValue {
/// assert!(!val.is_sensitive());
/// ```
#[inline]
pub fn set_sensitive(&mut self, val: bool) {
pub const fn set_sensitive(&mut self, val: bool) {
self.is_sensitive = val;
}

Expand Down
Loading