This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/main by this push:
new 08a53e6f9 AVRO-3925: [Rust] Improve formatting
08a53e6f9 is described below
commit 08a53e6f94391ccc96748a4fbbade9cf173a572a
Author: Martin Tzvetanov Grigorov <[email protected]>
AuthorDate: Thu Jan 4 12:59:51 2024 +0200
AVRO-3925: [Rust] Improve formatting
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
---
lang/rust/avro/src/schema.rs | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/lang/rust/avro/src/schema.rs b/lang/rust/avro/src/schema.rs
index ef9aa33ee..b26090cf2 100644
--- a/lang/rust/avro/src/schema.rs
+++ b/lang/rust/avro/src/schema.rs
@@ -48,8 +48,7 @@ fn schema_name_r() -> &'static Regex {
SCHEMA_NAME_ONCE.get_or_init(|| {
Regex::new(
r"^((?P<namespace>([A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*)?)\.)?(?P<name>[A-Za-z_][A-Za-z0-9_]*)$",
- )
- .unwrap()
+ ).unwrap()
})
}
@@ -6433,13 +6432,13 @@ mod tests {
let serialized_json = serde_json::to_string_pretty(&schema)?;
let expected_json = r#"{
- "type": "fixed",
- "name": "decimal_36_10",
- "size": 16,
- "logicalType": "decimal",
- "scale": 10,
- "precision": 36
-}"#;
+ "type": "fixed",
+ "name": "decimal_36_10",
+ "size": 16,
+ "logicalType": "decimal",
+ "scale": 10,
+ "precision": 36
+ }"#;
assert_eq!(serialized_json, expected_json);
Ok(())
@@ -6456,11 +6455,11 @@ mod tests {
let serialized_json = serde_json::to_string_pretty(&schema)?;
let expected_json = r#"{
- "type": "bytes",
- "logicalType": "decimal",
- "scale": 10,
- "precision": 36
-}"#;
+ "type": "bytes",
+ "logicalType": "decimal",
+ "scale": 10,
+ "precision": 36
+ }"#;
assert_eq!(serialized_json, expected_json);
Ok(())