Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help] cargo install showing errros #482

Closed
haunt98 opened this issue Sep 28, 2023 · 1 comment
Closed

[Help] cargo install showing errros #482

haunt98 opened this issue Sep 28, 2023 · 1 comment

Comments

@haunt98
Copy link

haunt98 commented Sep 28, 2023

cargo version: cargo 1.72.1 (103a7ff2e 2023-08-15)

rust version: stable-aarch64-apple-darwin unchanged - rustc 1.72.1 (d5c2e9c34 2023-09-13)

Try to install from cargo but get following error:

error[E0308]: mismatched types
   --> /Users/XXX/.cargo/registry/src/index.crates.io-6f17d22bba15001f/taplo-common-0.4.1/src/schema/mod.rs:555:29
    |
555 | ...                   Arc::try_unwrap(schema).unwrap()
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&Value`, found `Value`
    |
note: return type inferred to be `&serde_json::Value` here
   --> /Users/XXX/.cargo/registry/src/index.crates.io-6f17d22bba15001f/taplo-common-0.4.1/src/schema/mod.rs:507:13
    |
507 |             return;
    |             ^^^^^^
help: consider borrowing here
    |
555 |                             &Arc::try_unwrap(schema).unwrap()
    |                             +

error[E0308]: mismatched types
   --> /Users/XXX/.cargo/registry/src/index.crates.io-6f17d22bba15001f/taplo-common-0.4.1/src/schema/mod.rs:557:29
    |
557 | ...                   all_of.clone()
    |                       ^^^^^^^^^^^^^^ expected `&Value`, found `Value`
    |
note: return type inferred to be `&serde_json::Value` here
   --> /Users/XXX/.cargo/registry/src/index.crates.io-6f17d22bba15001f/taplo-common-0.4.1/src/schema/mod.rs:507:13
    |
507 |             return;
    |             ^^^^^^
help: try removing the method call
    |
557 -                             all_of.clone()
557 +                             all_of
    |
@ia0
Copy link
Collaborator

ia0 commented Sep 28, 2023

Thanks for the report!

This is a semver bug from json_merge_value. We fixed it on our side at head (#474) and waiting for a release (#473). For now, you can use cargo install --locked since you seem to be using stable.

@ia0 ia0 closed this as completed Sep 28, 2023
haunt98 added a commit to haunt98/dotfiles that referenced this issue Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants