MCPcopy Create free account
hub / github.com/HFQR/xitca-web / try_update

Method try_update

http-encoding/src/coding.rs:220–235  ·  view source on GitHub ↗
(&mut self, other: Self)

Source from the content-addressed store, hash-verified

218
219impl ContentEncodingWithQValue {
220 fn try_update(&mut self, other: Self) {
221 if other.val > self.val {
222 match other.enc {
223 #[cfg(not(feature = "br"))]
224 ContentEncoding::Br => return,
225 #[cfg(not(feature = "de"))]
226 ContentEncoding::Deflate => return,
227 #[cfg(not(feature = "gz"))]
228 ContentEncoding::Gzip => return,
229 #[cfg(not(feature = "zs"))]
230 ContentEncoding::Zstd => return,
231 _ => {}
232 };
233 *self = other;
234 }
235 }
236}
237
238#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]

Callers 2

from_headersMethod · 0.45
from_headers_withMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected