Kriskras99 commented on code in PR #311:
URL: https://github.com/apache/avro-rs/pull/311#discussion_r2419556222
##########
avro/src/schema.rs:
##########
@@ -2456,6 +2456,9 @@ pub mod derive {
use super::*;
use std::borrow::Cow;
+ pub use crate::writer::SERDE_FLATTEN;
+ pub use serde_json;
Review Comment:
Why re-export `serde_json`?
##########
avro_derive/tests/derive.rs:
##########
@@ -1676,4 +1676,56 @@ mod test_derive {
panic!("Unexpected schema type for Foo")
}
}
+
+ #[test]
+ fn test_serde_flatten() {
Review Comment:
Include the PR number in the test name. That makes it easier to search for
context when this test starts failing.
##########
avro/src/schema.rs:
##########
@@ -2456,6 +2456,9 @@ pub mod derive {
use super::*;
use std::borrow::Cow;
+ pub use crate::writer::SERDE_FLATTEN;
Review Comment:
This should have a `#[doc(hidden)]`
##########
avro/src/writer.rs:
##########
@@ -33,6 +34,8 @@ use std::{
const DEFAULT_BLOCK_SIZE: usize = 16000;
const AVRO_OBJECT_HEADER: &[u8] = b"Obj\x01";
+pub const SERDE_FLATTEN: &str = "serde-flatten";
Review Comment:
If we're going this direction, the name should probably changed to something
like `avro_rs_serde_flatten`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]