remove redundant error conversion
This commit is contained in:
parent
43fb1d86fd
commit
6567d38e23
2 changed files with 3 additions and 4 deletions
|
@ -8,5 +8,6 @@ fi
|
|||
cargo fmt -- --check
|
||||
cargo clippy --all-targets --all-features -- -D warnings
|
||||
cargo check --frozen
|
||||
cargo test --all-targets
|
||||
cargo test --all-targets --all-features
|
||||
cargo test --all-targets --all-features -- --ignored
|
||||
|
|
|
@ -108,8 +108,6 @@ mod must {
|
|||
use super::Lock;
|
||||
use anyhow::Result;
|
||||
|
||||
#[cfg(feature = "failpoints")]
|
||||
use anyhow::*;
|
||||
#[cfg(feature = "failpoints")]
|
||||
use fail::FailScenario;
|
||||
#[cfg(feature = "failpoints")]
|
||||
|
@ -133,7 +131,7 @@ mod must {
|
|||
#[test]
|
||||
fn be_able_to_lock_when_creating_lock_file_fails_sometimes() {
|
||||
let scenario = FailScenario::setup();
|
||||
fail::cfg("create-lock-file", "90%10*return(some lock file creation error)->off").map_err(|e| anyhow!(e)).unwrap();
|
||||
fail::cfg("create-lock-file", "90%10*return(some lock file creation error)->off").unwrap();
|
||||
|
||||
{
|
||||
let path = MemoryFS::new().into();
|
||||
|
@ -150,7 +148,7 @@ mod must {
|
|||
#[test]
|
||||
fn know_to_give_up_when_creating_lock_file_always_fails() {
|
||||
let scenario = FailScenario::setup();
|
||||
fail::cfg("create-lock-file", "return(persistent lock file creation error)").map_err(|e| anyhow!(e)).unwrap();
|
||||
fail::cfg("create-lock-file", "return(persistent lock file creation error)").unwrap();
|
||||
|
||||
let path = MemoryFS::new().into();
|
||||
assert!(Lock::lock_with_timeout(&path, 1).is_err());
|
||||
|
|
Loading…
Reference in a new issue