mirror of
https://github.com/telemt/telemt.git
synced 2026-07-24 06:26:14 +03:00
Rustfmt
This commit is contained in:
@@ -355,8 +355,14 @@ mod tests {
|
|||||||
|
|
||||||
let written = tokio::fs::read_to_string(&path).await.unwrap();
|
let written = tokio::fs::read_to_string(&path).await.unwrap();
|
||||||
assert!(written.contains("public_port = 443"), "{written}");
|
assert!(written.contains("public_port = 443"), "{written}");
|
||||||
assert!(!written.contains("443.0"), "must not be a float:\n{written}");
|
assert!(
|
||||||
assert!(!written.contains("\"443\""), "must not be a string:\n{written}");
|
!written.contains("443.0"),
|
||||||
|
"must not be a float:\n{written}"
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
!written.contains("\"443\""),
|
||||||
|
"must not be a string:\n{written}"
|
||||||
|
);
|
||||||
|
|
||||||
let parsed: toml::Value = toml::from_str(&written).unwrap();
|
let parsed: toml::Value = toml::from_str(&written).unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|||||||
@@ -381,7 +381,9 @@ fn header_belongs_to(header: &str, table_name: &str) -> bool {
|
|||||||
};
|
};
|
||||||
let body = body.trim();
|
let body = body.trim();
|
||||||
body == table_name
|
body == table_name
|
||||||
|| body.strip_prefix(table_name).is_some_and(|rest| rest.starts_with('.'))
|
|| body
|
||||||
|
.strip_prefix(table_name)
|
||||||
|
.is_some_and(|rest| rest.starts_with('.'))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Locate the first contiguous byte range covering `table_name` and the nested
|
/// Locate the first contiguous byte range covering `table_name` and the nested
|
||||||
|
|||||||
Reference in New Issue
Block a user