mirror of
https://github.com/ilyakooo0/reshape.git
synced 2024-12-01 18:42:07 +03:00
Fix clippy warnings
This commit is contained in:
parent
2d04d33b95
commit
d28110611c
@ -57,10 +57,14 @@ impl Action for AlterColumn {
|
|||||||
|
|
||||||
// Add temporary, nullable column
|
// Add temporary, nullable column
|
||||||
let mut temp_column_definition_parts: Vec<&str> =
|
let mut temp_column_definition_parts: Vec<&str> =
|
||||||
vec![&temporary_column_name, &temporary_column_type];
|
vec![&temporary_column_name, temporary_column_type];
|
||||||
|
|
||||||
// Use either new default value or existing one if one exists
|
// Use either new default value or existing one if one exists
|
||||||
let default_value = self.changes.default.as_ref().or(column.default.as_ref());
|
let default_value = self
|
||||||
|
.changes
|
||||||
|
.default
|
||||||
|
.as_ref()
|
||||||
|
.or_else(|| column.default.as_ref());
|
||||||
if let Some(default) = default_value {
|
if let Some(default) = default_value {
|
||||||
temp_column_definition_parts.push("DEFAULT");
|
temp_column_definition_parts.push("DEFAULT");
|
||||||
temp_column_definition_parts.push(default);
|
temp_column_definition_parts.push(default);
|
||||||
|
Loading…
Reference in New Issue
Block a user