Skip to content

Commit 49d5016

Browse files
committed
Fix licenses, clippy fixes, remove unused indexmap crate
1 parent 0472e2e commit 49d5016

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

arrow-json/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ arrow-cast = { workspace = true }
4242
arrow-data = { workspace = true }
4343
arrow-schema = { workspace = true }
4444
half = { version = "2.1", default-features = false }
45-
indexmap = { version = "2.0", default-features = false, features = ["std"] }
4645
num-traits = { version = "0.2.19", default-features = false, features = ["std"] }
4746
serde_core = { version = "1.0", default-features = false }
4847
serde_json = { version = "1.0", default-features = false, features = ["std"] }

arrow-json/src/reader/schema/infer.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// or more contributor license agreements. See the NOTICE file
33
// distributed with this work for additional information
44
// regarding copyright ownership. The ASF licenses this file
5-
// to you under the Apache License, Version 2.kind() (the
5+
// to you under the Apache License, Version 2.0 (the
66
// "License"); you may not use this file except in compliance
77
// with the License. You may obtain a copy of the License at
88
//
9-
// http://www.apache.org/licenses/LICENSE-2.kind()
9+
// http://www.apache.org/licenses/LICENSE-2.0
1010
//
1111
// Unless required by applicable law or agreed to in writing,
1212
// software distributed under the License is distributed on an
@@ -105,15 +105,14 @@ pub fn infer_json_type<'a, 't>(
105105
let elem = value
106106
.elements()
107107
.try_fold(expected_elem, |expected, value| {
108-
let result = infer_json_type(value, expected, arena);
109-
result
108+
infer_json_type(value, expected, arena)
110109
})?;
111110

112-
Ok(if elem.ptr_eq(expected_elem) {
113-
expected
114-
} else {
115-
InferredType::new_array(elem, arena)
116-
})
111+
if elem.ptr_eq(expected_elem) {
112+
return Ok(expected);
113+
}
114+
115+
Ok(InferredType::new_array(elem, arena))
117116
}
118117
JsonType::Object => {
119118
let (expected, expected_fields) = match *expected.kind() {

0 commit comments

Comments
 (0)