Skip to content

Commit 1066bcf

Browse files
committed
improve logs
1 parent f5e9441 commit 1066bcf

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/header/map.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,10 @@ impl<T> HeaderMap<T> {
480480
///
481481
/// More capacity than requested may be allocated.
482482
///
483+
/// # Errors
484+
///
485+
/// This function may return an error if `HeaderMap` exceeds max capacity
486+
///
483487
/// # Examples
484488
///
485489
/// ```
@@ -1222,6 +1226,10 @@ impl<T> HeaderMap<T> {
12221226
/// The key is not updated, though; this matters for types that can be `==`
12231227
/// without being identical.
12241228
///
1229+
/// # Errors
1230+
///
1231+
/// This function may return an error if `HeaderMap` exceeds max capacity
1232+
///
12251233
/// # Examples
12261234
///
12271235
/// ```
@@ -1358,6 +1366,10 @@ impl<T> HeaderMap<T> {
13581366
/// updated, though; this matters for types that can be `==` without being
13591367
/// identical.
13601368
///
1369+
/// # Errors
1370+
///
1371+
/// This function may return an error if `HeaderMap` exceeds max capacity
1372+
///
13611373
/// # Examples
13621374
///
13631375
/// ```
@@ -2452,6 +2464,10 @@ impl<'a, T> Entry<'a, T> {
24522464
///
24532465
/// Returns a mutable reference to the **first** value in the entry.
24542466
///
2467+
/// # Errors
2468+
///
2469+
/// This function may return an error if `HeaderMap` exceeds max capacity
2470+
///
24552471
/// # Examples
24562472
///
24572473
/// ```

src/header/value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ mod from_header_name_tests {
492492
map.insert(
493493
name::ACCEPT,
494494
name::HeaderName::from_bytes(b"hello-world").unwrap().into(),
495-
).unwrap();
495+
);
496496

497497
assert_eq!(
498498
map.get(name::UPGRADE).unwrap(),

0 commit comments

Comments
 (0)