From af2ba7eebf0294ae8db4742209bb267292a088b4 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Sat, 22 Sep 2018 11:13:10 +1000 Subject: [PATCH] Fix clippy lint in MemoryDB --- lighthouse/db/memory_db.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lighthouse/db/memory_db.rs b/lighthouse/db/memory_db.rs index 154b85560..41d1f7e6d 100644 --- a/lighthouse/db/memory_db.rs +++ b/lighthouse/db/memory_db.rs @@ -86,12 +86,12 @@ impl ClientDB for MemoryDB { let db = self.db.read().unwrap(); let known_columns = self.known_columns.read().unwrap(); - match known_columns.contains(&col.to_string()) { - false => Err(DBError{ message: "Unknown column".to_string() }), - true => { - let column_key = MemoryDB::get_key_for_col(col, key); - Ok(db.contains_key(&column_key)) - } + if known_columns.contains(&col.to_string()) { + let column_key = MemoryDB::get_key_for_col(col, key); + Ok(db.contains_key(&column_key)) + } else { + Err(DBError{ message: "Unknown column".to_string() }) + } } }