wrap line to avoid style error

This commit is contained in:
Dan Dumont 2024-04-04 11:45:02 -04:00
parent c2251a4b48
commit 9768b681d0
No known key found for this signature in database
GPG Key ID: C1D78EE92127DA19
4 changed files with 15 additions and 6 deletions

8
.editorconfig Normal file
View File

@ -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

View File

@ -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

View File

@ -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",
}) })

View File

@ -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;");