mirror of https://github.com/rwf2/Rocket.git
wrap line to avoid style error
This commit is contained in:
parent
c2251a4b48
commit
9768b681d0
|
@ -0,0 +1,8 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*.rs]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
indent_style = tab
|
||||||
|
tab_width = 4
|
|
@ -65,22 +65,22 @@ macro_rules! content_codings {
|
||||||
#[allow(non_upper_case_globals)]
|
#[allow(non_upper_case_globals)]
|
||||||
pub const $name: ContentCoding = ContentCoding::new_known(
|
pub const $name: ContentCoding = ContentCoding::new_known(
|
||||||
$c,
|
$c,
|
||||||
$c,
|
$c,
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
)+
|
)+
|
||||||
|
|
||||||
/// Returns `true` if this ContentCoding is known to Rocket. In other words,
|
/// Returns `true` if this ContentCoding is known to Rocket. In other words,
|
||||||
/// returns `true` if there is an associated constant for `self`.
|
/// returns `true` if there is an associated constant for `self`.
|
||||||
pub fn is_known(&self) -> bool {
|
pub fn is_known(&self) -> bool {
|
||||||
if let Source::Known(_) = self.source {
|
if let Source::Known(_) = self.source {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$(if self.$check() { return true })+
|
$(if self.$check() { return true })+
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
$(
|
$(
|
||||||
/// Returns `true` if the top-level and sublevel types of
|
/// Returns `true` if the top-level and sublevel types of
|
||||||
/// `self` are the same as those of
|
/// `self` are the same as those of
|
||||||
|
|
|
@ -3,7 +3,8 @@ macro_rules! known_content_codings {
|
||||||
Any (is_any): "any content coding", "*",
|
Any (is_any): "any content coding", "*",
|
||||||
// BR (is_br): "Brotli Compressed Data Format", "br",
|
// BR (is_br): "Brotli Compressed Data Format", "br",
|
||||||
// COMPRESS (is_compress): "UNIX \"compress\" data format", "compress",
|
// COMPRESS (is_compress): "UNIX \"compress\" data format", "compress",
|
||||||
// DEFLATE (is_deflate): "\"deflate\" compressed data inside the \"zlib\" data format", "deflate",
|
// DEFLATE (is_deflate): "\"deflate\" compressed data inside the \"zlib\"
|
||||||
|
// data format", "deflate",
|
||||||
GZIP (is_gzip): "GZIP file format", "gzip",
|
GZIP (is_gzip): "GZIP file format", "gzip",
|
||||||
IDENTITY (is_identity): "Reserved", "identity",
|
IDENTITY (is_identity): "Reserved", "identity",
|
||||||
})
|
})
|
||||||
|
|
|
@ -110,7 +110,7 @@ mod test {
|
||||||
fn check_params_do_parse() {
|
fn check_params_do_parse() {
|
||||||
assert_parse!("*; q=1");
|
assert_parse!("*; q=1");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_bad_parses() {
|
fn test_bad_parses() {
|
||||||
assert_no_parse!("*; q=1;");
|
assert_no_parse!("*; q=1;");
|
||||||
|
|
Loading…
Reference in New Issue