Skip to content

Commit 979e177

Browse files
committed
chore: latest clippy
Signed-off-by: Robert Pack <[email protected]>
1 parent 7092f64 commit 979e177

File tree

14 files changed

+18
-20
lines changed

14 files changed

+18
-20
lines changed

crates/core/src/kernel/arrow/engine_ext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ fn stats_schema(
118118
mut min_max_transform: MinMaxStatsTransform,
119119
) -> DeltaResult<SchemaRef> {
120120
let min_max_schema =
121-
if let Some(min_max_schema) = min_max_transform.transform_struct(&physical_schema) {
121+
if let Some(min_max_schema) = min_max_transform.transform_struct(physical_schema) {
122122
min_max_schema.into_owned()
123123
} else {
124124
StructType::new(vec![])

crates/core/src/logstore/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ mod tests {
330330
};
331331

332332
let result: ParseResult<RetryConfig> = options.into_iter().collect();
333-
println!("result: {:?}", result);
333+
println!("result: {result:?}");
334334
assert!(!result.errors.is_empty());
335335
assert!(!result.unparsed.is_empty());
336336
assert!(!result.is_default);
@@ -381,11 +381,11 @@ mod tests {
381381
let falsy_values = ["0", "false", "off", "NO", "n", "bork", "False", "OFF"];
382382

383383
for value in truthy_values {
384-
assert!(str_is_truthy(value), "{} should be truthy", value);
384+
assert!(str_is_truthy(value), "{value} should be truthy");
385385
}
386386

387387
for value in falsy_values {
388-
assert!(!str_is_truthy(value), "{} should be falsy", value);
388+
assert!(!str_is_truthy(value), "{value} should be falsy");
389389
}
390390
}
391391

crates/core/src/logstore/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ pub async fn get_latest_version(
674674
.map_err(|e| DeltaTableError::Generic(e.to_string()))?
675675
.map_err(|e| {
676676
if e.to_string()
677-
.contains(&format!("to have version {}", current_version))
677+
.contains(&format!("to have version {current_version}"))
678678
{
679679
DeltaTableError::InvalidVersion(current_version)
680680
} else {

crates/core/src/operations/merge/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ async fn execute(
875875
}
876876
};
877877

878-
debug!("Using target subset filter: {:?}", commit_predicate);
878+
debug!("Using target subset filter: {commit_predicate:?}");
879879

880880
let file_column = Arc::new(scan_config.file_column_name.clone().unwrap());
881881
// Need to manually push this filter into the scan... We want to PRUNE files not FILTER RECORDS

crates/core/src/operations/update_table_metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl std::future::IntoFuture for UpdateTableMetadataBuilder {
113113
})?;
114114
update
115115
.validate()
116-
.map_err(|e| DeltaTableError::MetadataError(format!("{}", e)))?;
116+
.map_err(|e| DeltaTableError::MetadataError(format!("{e}")))?;
117117

118118
let mut metadata = this.snapshot.metadata().clone();
119119

crates/core/src/operations/write/generated_columns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::table::state::DeltaTableState;
22
use datafusion::common::ScalarValue;
3-
use datafusion::logical_expr::{col, when, Expr, ExprSchemable};
3+
use datafusion::logical_expr::{col, when, ExprSchemable};
44
use datafusion::prelude::lit;
55
use datafusion::{execution::SessionState, prelude::DataFrame};
66
use delta_kernel::engine::arrow_conversion::TryIntoArrow as _;

crates/core/src/table/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ impl TableConfig<'_> {
388388
.and_then(|o| {
389389
o.as_ref().and_then(|v| {
390390
ColumnName::parse_column_name_list(v)
391-
.inspect_err(|e| println!("{:?}", e))
391+
.inspect_err(|e| println!("{e:?}"))
392392
.ok()
393393
})
394394
})

crates/core/tests/dat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn reader_test_eager(path: &Path) -> datatest_stable::Result<()> {
1818
);
1919
for skipped in SKIPPED_TESTS {
2020
if root_dir.ends_with(skipped) {
21-
println!("Skipping test: {}", skipped);
21+
println!("Skipping test: {skipped}");
2222
return Ok(());
2323
}
2424
}

crates/core/tests/integration_datafusion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ mod local {
304304
for pp in pruning_predicates {
305305
let pred = pp.sql;
306306
let sql = format!("SELECT CAST( day as int ) as my_day FROM demo WHERE {pred} ORDER BY CAST( day as int ) ASC");
307-
println!("\nExecuting query: {}", sql);
307+
println!("\nExecuting query: {sql}");
308308

309309
let df = ctx.sql(sql.as_str()).await?;
310310

crates/derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub fn derive_delta_config(input: TokenStream) -> TokenStream {
6767
}
6868

6969
fn generate_config_keys(name: &Ident, fields: &[&Field]) -> Result<proc_macro2::TokenStream> {
70-
let enum_name = Ident::new(&format!("{}Key", name), Span::call_site());
70+
let enum_name = Ident::new(&format!("{name}Key"), Span::call_site());
7171
let variants: Vec<_> = fields
7272
.iter()
7373
.map(|field| {

0 commit comments

Comments
 (0)