Skip to content

Commit faace2c

Browse files
authored
Fix Clippy 1.85 warnings (#14800)
1 parent b66beb8 commit faace2c

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

datafusion/core/tests/execution/logical_plan.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
//! Logical plans need to provide stable semantics, as downstream projects
19+
//! create them and depend on them. Test executable semantics of logical plans.
20+
1821
use arrow::array::Int64Array;
1922
use arrow::datatypes::{DataType, Field};
2023
use datafusion::execution::session_state::SessionStateBuilder;
@@ -30,9 +33,6 @@ use std::fmt::Debug;
3033
use std::ops::Deref;
3134
use std::sync::Arc;
3235

33-
///! Logical plans need to provide stable semantics, as downstream projects
34-
///! create them and depend on them. Test executable semantics of logical plans.
35-
3636
#[tokio::test]
3737
async fn count_only_nulls() -> Result<()> {
3838
// Input: VALUES (NULL), (NULL), (NULL) AS _(col)

datafusion/execution/src/runtime_env.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use crate::{
2727
};
2828

2929
use crate::cache::cache_manager::{CacheManager, CacheManagerConfig};
30-
use datafusion_common::{DataFusionError, Result};
30+
use datafusion_common::Result;
3131
use object_store::ObjectStore;
3232
use std::path::PathBuf;
3333
use std::sync::Arc;
@@ -150,9 +150,7 @@ impl RuntimeEnv {
150150
/// registry. See [`ObjectStoreRegistry::get_store`] for more
151151
/// details.
152152
pub fn object_store(&self, url: impl AsRef<Url>) -> Result<Arc<dyn ObjectStore>> {
153-
self.object_store_registry
154-
.get_store(url.as_ref())
155-
.map_err(DataFusionError::from)
153+
self.object_store_registry.get_store(url.as_ref())
156154
}
157155
}
158156

datafusion/physical-expr-common/src/binary_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ where
384384

385385
// value is "small"
386386
let payload = if value.len() <= SHORT_VALUE_LEN {
387-
let inline = value.iter().fold(0usize, |acc, &x| acc << 8 | x as usize);
387+
let inline = value.iter().fold(0usize, |acc, &x| (acc << 8) | x as usize);
388388

389389
// is value is already present in the set?
390390
let entry = self.map.find_mut(hash, |header| {

datafusion/sql/src/expr/value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ fn try_decode_hex_literal(s: &str) -> Option<Vec<u8>> {
304304
for i in (start_idx..hex_bytes.len()).step_by(2) {
305305
let high = try_decode_hex_char(hex_bytes[i])?;
306306
let low = try_decode_hex_char(hex_bytes[i + 1])?;
307-
decoded_bytes.push(high << 4 | low);
307+
decoded_bytes.push((high << 4) | low);
308308
}
309309

310310
Some(decoded_bytes)

test-utils/src/array_gen/string.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ fn random_string(rng: &mut StdRng, max_len: usize) -> String {
9797
let len = rng.gen_range(1..=max_len);
9898
rng.sample_iter::<char, _>(rand::distributions::Standard)
9999
.take(len)
100-
.map(char::from)
101100
.collect::<String>()
102101
}
103102
}

0 commit comments

Comments
 (0)