Skip to content

Commit 1101477

Browse files
authored
Fix new clippy warnings (#801)
1 parent 61681d8 commit 1101477

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

dask_planner/src/sql/logical/analyze_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl PyAnalyzeTable {
8585
.schema_name
8686
.as_ref()
8787
.cloned()
88-
.unwrap_or_else(|| "".to_string()))
88+
.unwrap_or_default())
8989
}
9090

9191
#[pyo3(name = "getColumns")]

dask_planner/src/sql/logical/show_columns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl PyShowColumns {
7979
.schema_name
8080
.as_ref()
8181
.cloned()
82-
.unwrap_or_else(|| "".to_string()))
82+
.unwrap_or_default())
8383
}
8484
}
8585

dask_planner/src/sql/logical/show_schema.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,7 @@ pub struct PyShowSchema {
6767
impl PyShowSchema {
6868
#[pyo3(name = "getLike")]
6969
fn get_like(&self) -> PyResult<String> {
70-
Ok(self
71-
.show_schema
72-
.like
73-
.as_ref()
74-
.cloned()
75-
.unwrap_or_else(|| "".to_string()))
70+
Ok(self.show_schema.like.as_ref().cloned().unwrap_or_default())
7671
}
7772
}
7873

dask_planner/src/sql/logical/show_tables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl PyShowTables {
7272
.schema_name
7373
.as_ref()
7474
.cloned()
75-
.unwrap_or_else(|| "".to_string()))
75+
.unwrap_or_default())
7676
}
7777
}
7878

0 commit comments

Comments
 (0)