vaultrs icon indicating copy to clipboard operation
vaultrs copied to clipboard

fix: VAULT_SKIP_VERIFY inverted behavior

Open PierreBeucher opened this issue 9 months ago • 0 comments

VAULT_SKIP_VERIFY=1 was actually ENABLING verify while VAULT_SKIP_VERIFY=0 was SKIPPING verify. We want the opposite.

I was able to cargo build but not cargo test in a nix develop shell, I had failure:

$ cargo test
   Compiling vaultrs v0.7.2 (/home/pbeucher/git/vaultrs)
error[E0277]: the trait bound `Vec<std::string::String>: From<&[std::string::String; 2]>` is not satisfied
   --> tests/identity.rs:224:44
    |
224 |     identity::entity::batch_delete(client, &[entity1.id.to_string(), entity2.id.to_string()])
    |     ------------------------------         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<&[std::string::String; 2]>` is not implemented for `Vec<std::string::String>`
    |     |
    |     required by a bound introduced by this call
    |
    = note: required for `&[std::string::String; 2]` to implement `Into<Vec<std::string::String>>`
note: required by a bound in `batch_delete`
   --> /home/pbeucher/git/vaultrs/src/identity/entity.rs:77:43
    |
77  | pub async fn batch_delete<T: fmt::Debug + Into<Vec<String>>>(
    |                                           ^^^^^^^^^^^^^^^^^ required by this bound in `batch_delete`
help: consider dereferencing here
    |
224 |     identity::entity::batch_delete(client, *&[entity1.id.to_string(), entity2.id.to_string()])
    |                                            +

For more information about this error, try `rustc --explain E0277`.
error: could not compile `vaultrs` (test "identity") due to previous error
warning: build failed, waiting for other jobs to finish...
[Vaultrs Devshell]$ rustc --version
rustc 1.70.0-nightly (8be3c2bda 2023-03-24)

This does not seem related to my local changes, maybe Nix dev shell is broken?

But I hope change is simple enough, if a reviewer or owner can test it on its own :)

PierreBeucher avatar May 16 '24 08:05 PierreBeucher