brianshih1 / mini-key-value-db

1 stars 1 forks source link

Fix linter issues #9

Closed varunu28 closed 10 months ago

varunu28 commented 10 months ago

Issue Running cargo build results in errors due to bindings_with_variant_name on Mac M1

Error log First Instance:

error[E0170]: pattern binding `TxnAborted` is named the same as one of the variants of the type `lock_table::lock_table::WaitForGuardError`
  --> src/concurrency/concurrency_manager.rs:56:25
   |
56 |                         TxnAborted => return Err(SequenceReqError::TxnAborted),
   |                         ^^^^^^^^^^ help: to match on the variant, qualify the path: `lock_table::lock_table::WaitForGuardError::TxnAborted`
   |
   = note: `#[deny(bindings_with_variant_name)]` on by default

error[E0170]: pattern binding `TxnCommitted` is named the same as one of the variants of the type `lock_table::lock_table::WaitForGuardError`
  --> src/concurrency/concurrency_manager.rs:57:25
   |
57 |                         TxnCommitted => return Err(SequenceReqError::TxnCommitted),
   |                         ^^^^^^^^^^^^ help: to match on the variant, qualify the path: `lock_table::lock_table::WaitForGuardError::TxnCommitted`

Second Instance

error[E0170]: pattern binding `TxnAborted` is named the same as one of the variants of the type `concurrency::concurrency_manager::SequenceReqError`
  --> src/execute/executor.rs:74:21
   |
74 |                     TxnAborted => return ExecuteResult::Err(ExecuteError::TxnAborted),
   |                     ^^^^^^^^^^ help: to match on the variant, qualify the path: `concurrency::concurrency_manager::SequenceReqError::TxnAborted`

error[E0170]: pattern binding `TxnCommitted` is named the same as one of the variants of the type `concurrency::concurrency_manager::SequenceReqError`
  --> src/execute/executor.rs:75:21
   |
75 |                     TxnCommitted => return ExecuteResult::Err(ExecuteError::TxnCommitted),
   |                     ^^^^^^^^^^^^ help: to match on the variant, qualify the path: `concurrency::concurrency_manager::SequenceReqError::TxnCommitted`

Change Adding explicit import for enum values

brianshih1 commented 10 months ago

thanks!!