Skip to content

Commit 7bd654e

Browse files
committed
clippy
1 parent 088334b commit 7bd654e

File tree

12 files changed

+23
-23
lines changed

12 files changed

+23
-23
lines changed

src/expr/copy_to.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ impl PyCopyTo {
7272
file_type: PyFileType,
7373
options: HashMap<String, String>,
7474
) -> Self {
75-
return PyCopyTo {
75+
PyCopyTo {
7676
copy: CopyTo {
7777
input: input.plan(),
7878
output_url,
7979
partition_by,
8080
file_type: file_type.file_type,
8181
options,
8282
},
83-
};
83+
}
8484
}
8585

8686
fn input(&self) -> PyLogicalPlan {

src/expr/create_external_table.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl PyCreateExternalTable {
9797
.map(|(k, v)| (k, v.into()))
9898
.collect(),
9999
};
100-
PyCreateExternalTable { create: create }
100+
PyCreateExternalTable { create }
101101
}
102102

103103
pub fn schema(&self) -> PyDFSchema {
@@ -176,7 +176,7 @@ impl LogicalNode for PyCreateExternalTable {
176176
vec![]
177177
}
178178

179-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
179+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
180180
Ok(self.clone().into_py(py))
181181
}
182182
}

src/expr/create_function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl LogicalNode for PyCreateFunction {
176176
vec![]
177177
}
178178

179-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
179+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
180180
Ok(self.clone().into_py(py))
181181
}
182182
}

src/expr/describe_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl LogicalNode for PyDescribeTable {
6969
vec![]
7070
}
7171

72-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
72+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
7373
Ok(self.clone().into_py(py))
7474
}
7575
}

src/expr/dml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl LogicalNode for PyDmlStatement {
2929
vec![PyLogicalPlan::from((*self.dml.input).clone())]
3030
}
3131

32-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
32+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
3333
Ok(self.clone().into_py(py))
3434
}
3535
}

src/expr/drop_catalog_schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl LogicalNode for PyDropCatalogSchema {
9393
vec![]
9494
}
9595

96-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
96+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
9797
Ok(self.clone().into_py(py))
9898
}
9999
}

src/expr/drop_function.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl PyDropFunction {
4040
fn new(name: String, schema: PyDFSchema, if_exists: bool) -> PyResult<Self> {
4141
Ok(PyDropFunction {
4242
drop: DropFunction {
43-
name: name.into(),
43+
name,
4444
schema: Arc::new(schema.into()),
4545
if_exists,
4646
},
@@ -72,7 +72,7 @@ impl LogicalNode for PyDropFunction {
7272
vec![]
7373
}
7474

75-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
75+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
7676
Ok(self.clone().into_py(py))
7777
}
7878
}

src/expr/drop_view.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl LogicalNode for PyDropView {
7979
vec![]
8080
}
8181

82-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
82+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
8383
Ok(self.clone().into_py(py))
8484
}
8585
}

src/expr/recursive_query.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl LogicalNode for PyRecursiveQuery {
8888
]
8989
}
9090

91-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
91+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
9292
Ok(self.clone().into_py(py))
9393
}
9494
}

src/expr/statement.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl LogicalNode for PyTransactionStart {
3333
vec![]
3434
}
3535

36-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
36+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
3737
Ok(self.clone().into_py(py))
3838
}
3939
}
@@ -166,7 +166,7 @@ impl LogicalNode for PyTransactionEnd {
166166
vec![]
167167
}
168168

169-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
169+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
170170
Ok(self.clone().into_py(py))
171171
}
172172
}
@@ -241,7 +241,7 @@ impl LogicalNode for PySetVariable {
241241
vec![]
242242
}
243243

244-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
244+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
245245
Ok(self.clone().into_py(py))
246246
}
247247
}
@@ -289,7 +289,7 @@ impl LogicalNode for PyPrepare {
289289
vec![PyLogicalPlan::from((*self.prepare.input).clone())]
290290
}
291291

292-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
292+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
293293
Ok(self.clone().into_py(py))
294294
}
295295
}
@@ -301,7 +301,7 @@ impl PyPrepare {
301301
let input = input.plan().clone();
302302
let data_types = data_types
303303
.into_iter()
304-
.map(|data_type| data_type.try_into().unwrap())
304+
.map(|data_type| data_type.into())
305305
.collect();
306306
PyPrepare {
307307
prepare: Prepare {
@@ -357,7 +357,7 @@ impl LogicalNode for PyExecute {
357357
vec![]
358358
}
359359

360-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
360+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
361361
Ok(self.clone().into_py(py))
362362
}
363363
}
@@ -368,7 +368,7 @@ impl PyExecute {
368368
pub fn new(name: String, parameters: Vec<PyExpr>) -> Self {
369369
let parameters = parameters
370370
.into_iter()
371-
.map(|parameter| parameter.try_into().unwrap())
371+
.map(|parameter| parameter.into())
372372
.collect();
373373
PyExecute {
374374
execute: Execute { name, parameters },
@@ -414,7 +414,7 @@ impl LogicalNode for PyDeallocate {
414414
vec![]
415415
}
416416

417-
fn to_variant<'py>(&self, py: Python<'py>) -> PyResult<PyObject> {
417+
fn to_variant(&self, py: Python<'_>) -> PyResult<PyObject> {
418418
Ok(self.clone().into_py(py))
419419
}
420420
}

0 commit comments

Comments
 (0)