mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-26 18:00:41 +00:00
style(table-engine): Remove unnecessary TableError::from (#312)
The usage of TableError::from could be replaced by `?`, which is more concise
This commit is contained in:
@@ -100,7 +100,7 @@ impl<R: Region> Table for MitoTable<R> {
|
||||
.add_key_column(name, vector)
|
||||
.map_err(TableError::new)?;
|
||||
} else if !column_schema.is_nullable {
|
||||
return MissingColumnSnafu { name }.fail().map_err(TableError::from);
|
||||
return MissingColumnSnafu { name }.fail()?;
|
||||
}
|
||||
}
|
||||
// Add value columns
|
||||
@@ -116,7 +116,7 @@ impl<R: Region> Table for MitoTable<R> {
|
||||
if let Some(v) = vector {
|
||||
put_op.add_value_column(name, v).map_err(TableError::new)?;
|
||||
} else if !column_schema.is_nullable {
|
||||
return MissingColumnSnafu { name }.fail().map_err(TableError::from);
|
||||
return MissingColumnSnafu { name }.fail()?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user