Skip to content

Commit

Permalink
fix clippys
Browse files Browse the repository at this point in the history
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
  • Loading branch information
waynexia committed Nov 14, 2022
1 parent e3564a2 commit 2031a73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
8 changes: 3 additions & 5 deletions tests/runner/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ impl Environment for Env {

/// Stop one [`Database`].
async fn stop(&self, _mode: &str, mut database: Self::DB) {
if let Err(e) = database.server_process.kill().await {
eprintln!("Cannot kill the server process, error: {:?}", e);
}
database.server_process.kill().await.unwrap()
}
}

Expand Down Expand Up @@ -143,8 +141,8 @@ impl SelectResultDisplayer<'_> {

for row_index in 0..row_count {
let mut row = Vec::with_capacity(col_count);
for col_index in 0..col_count {
row.push(columns[col_index][row_index].clone())
for col in columns.iter() {
row.push(col[row_index].clone());
}
table.add_row(row);
}
Expand Down
6 changes: 1 addition & 5 deletions tests/runner/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ pub fn values_to_string(data_type: ColumnDataType, values: Values) -> Vec<String
.into_iter()
.map(|val| val.to_string())
.collect(),
ColumnDataType::String => values
.string_values
.into_iter()
.map(|val| val.to_string())
.collect(),
ColumnDataType::String => values.string_values,
ColumnDataType::Boolean => values
.bool_values
.into_iter()
Expand Down

0 comments on commit 2031a73

Please sign in to comment.