MCPcopy Create free account
hub / github.com/awslabs/llrt / lower_key

Function lower_key

modules/llrt_fetch/src/headers.rs:31–34  ·  view source on GitHub ↗

ASCII-lowercase the key in place (HTTP headers are ASCII-only) and wrap in `Rc `, saving one allocation vs `key.to_lowercase().into()`.

(mut key: String)

Source from the content-addressed store, hash-verified

29/// ASCII-lowercase the key in place (HTTP headers are ASCII-only) and wrap in `Rc<str>`,
30/// saving one allocation vs `key.to_lowercase().into()`.
31fn lower_key(mut key: String) -> ImmutableString {
32 key.make_ascii_lowercase();
33 key.into()
34}
35
36// https://fetch.spec.whatwg.org/#concept-headers-guard
37#[derive(Clone, Copy, Default, PartialEq)]

Callers 5

appendMethod · 0.85
getMethod · 0.85
hasMethod · 0.85
setMethod · 0.85
deleteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected