scovich commented on code in PR #8324: URL: https://github.com/apache/arrow-rs/pull/8324#discussion_r2344616766
########## parquet-variant/src/builder.rs: ########## @@ -1683,26 +1712,31 @@ pub trait VariantBuilderExt { /// Creates a nested list builder. See e.g. [`VariantBuilder::new_list`]. Panics if the nested /// builder cannot be created, see e.g. [`ObjectBuilder::new_list`]. - fn new_list(&mut self) -> ListBuilder<'_> { + fn new_list(&mut self) -> ListBuilder<'_, Self::State<'_>> { Review Comment: NOTE: If associated type defaults were stable, we could simplify the code even further: ```rust pub trait VariantBuilderExt { /// The builder specific state used by nested builders type State<'a>: BuilderSpecificState + 'a where Self: 'a; type ListBuilder<'a> = ListBuilder<'a, Self::State<'a>> where Self: 'a; type ObjectBuilder<'a> = ObjectBuilder<'a, Self::State<'a>> where Self: 'a; ... fn try_new_list(&mut self) -> Result<Self::ListBuilder<'_>, ArrowError>; fn try_new_object(&mut self) -> Result<Self::ObjectBuilder<'_>, ArrowError>; } ``` -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org