Skip to content

Commit a5bfbb9

Browse files
committed
[FIX] use impl in convert_variant_to_json function
1 parent 08b8241 commit a5bfbb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

parquet-variant/src/to_json.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ use crate::variant::{Variant, VariantList, VariantObject};
5151
/// }
5252
/// example().unwrap();
5353
/// ```
54-
pub fn variant_to_json<W: Write>(json_buffer: &mut W, variant: &Variant) -> Result<(), ArrowError> {
54+
pub fn variant_to_json(json_buffer: &mut impl Write, variant: &Variant) -> Result<(), ArrowError> {
5555
match variant {
5656
Variant::Null => {
5757
write!(json_buffer, "null")?;
@@ -133,7 +133,7 @@ pub fn variant_to_json<W: Write>(json_buffer: &mut W, variant: &Variant) -> Resu
133133
}
134134

135135
/// Convert object fields to JSON
136-
fn convert_object_to_json<W: Write>(buffer: &mut W, obj: &VariantObject) -> Result<(), ArrowError> {
136+
fn convert_object_to_json(buffer: &mut impl Write, obj: &VariantObject) -> Result<(), ArrowError> {
137137
write!(buffer, "{{")?;
138138

139139
// Get all fields from the object
@@ -161,7 +161,7 @@ fn convert_object_to_json<W: Write>(buffer: &mut W, obj: &VariantObject) -> Resu
161161
}
162162

163163
/// Convert array elements to JSON
164-
fn convert_array_to_json<W: Write>(buffer: &mut W, arr: &VariantList) -> Result<(), ArrowError> {
164+
fn convert_array_to_json(buffer: &mut impl Write, arr: &VariantList) -> Result<(), ArrowError> {
165165
write!(buffer, "[")?;
166166

167167
let len = arr.len();

0 commit comments

Comments
 (0)