Skip to content

Commit

Permalink
wrap line to avoid style error
Browse files Browse the repository at this point in the history
  • Loading branch information
hcldan committed Apr 4, 2024
1 parent c2251a4 commit 9768b68
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions core/http/src/header/content_coding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,22 @@ macro_rules! content_codings {
#[allow(non_upper_case_globals)]
pub const $name: ContentCoding = ContentCoding::new_known(
$c,
$c,
$c,
None,
);
)+

/// Returns `true` if this ContentCoding is known to Rocket. In other words,
/// returns `true` if there is an associated constant for `self`.
pub fn is_known(&self) -> bool {
if let Source::Known(_) = self.source {
return true;
}

$(if self.$check() { return true })+
false
}

$(
/// Returns `true` if the top-level and sublevel types of
/// `self` are the same as those of
Expand Down
3 changes: 2 additions & 1 deletion core/http/src/header/known_content_codings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ macro_rules! known_content_codings {
Any (is_any): "any content coding", "*",
// BR (is_br): "Brotli Compressed Data Format", "br",
// 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",
IDENTITY (is_identity): "Reserved", "identity",
})
Expand Down
2 changes: 1 addition & 1 deletion core/http/src/parse/content_coding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ mod test {
fn check_params_do_parse() {
assert_parse!("*; q=1");
}

#[test]
fn test_bad_parses() {
assert_no_parse!("*; q=1;");
Expand Down

0 comments on commit 9768b68

Please sign in to comment.