Benign cargo Download

entity.rs

Rust test marker or harness
SHA-2564c6ed1f7e626f995f882ae0f0fb260da191cd1b0db83a8a34523dc4597f3736c
MaleculeMd(Pa)

Evidence

imports header::HeaderValue lines 1–8
1use header::{HeaderValue, IntoHeaderValue, InvalidHeaderValueBytes, Writer};
2use std::fmt::{self, Display, Write};
3use std::str::FromStr;
4
5/// check that each char in the slice is either:
6/// 1. `%x21`, or
7/// 2. in the range `%x23` to `%x7E`, or
8/// 3. above `%x …
English function-word token "and" lines 18–26
18:69… or,
19/// which always looks like `W/`. Examples for valid tags are `"xyzzy"` and
20/// `W/"xyzzy"`.
21///
⋯5 lines
imports super::EntityTag lines 163–177
163:38… p();
164 HeaderValue::from_shared(wrt.take())
165 }
166}
167
168#[cfg(test)]
169mod tests {
170 use super::EntityTag;
171
172 #[test]
173 fn test_etag_parse_success() {
174 // Expected success
175 assert_eq!(
176 "\"foobar\"".parse::<EntityTag>().unwrap(),
177 EntityTag::strong("fooba …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.