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

cargo install results in a type mismatch error #39

Closed
edikedik opened this issue Jan 26, 2025 · 2 comments
Closed

cargo install results in a type mismatch error #39

edikedik opened this issue Jan 26, 2025 · 2 comments

Comments

@edikedik
Copy link

Hi,

attempting to install the tool with cargo, I'm getting the following error:

   Compiling haddock-restraints v0.7.0
error[E0308]: mismatched types
   --> /home/edik/.cargo/registry/src/index.crates.io-6f17d22bba15001f/haddock-restraints-0.7.0/src/sasa.rs:123:38
    |
123 |     let result = calculate_rust_sasa(&pdbtbx_struct, None, None, SASALevel::Atom).unwrap();
    |                  ------------------- ^^^^^^^^^^^^^^ expected `pdbtbx::structs::pdb::PDB`, found `PDB`
    |                  |
    |                  arguments to this function are incorrect
    |
    = note: `PDB` and `pdbtbx::structs::pdb::PDB` have similar names, but are actually distinct types
note: `PDB` is defined in crate `pdbtbx`
   --> /home/edik/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pdbtbx-0.11.0/src/structs/pdb.rs:35:1
    |
35  | pub struct PDB {
    | ^^^^^^^^^^^^^^
note: `pdbtbx::structs::pdb::PDB` is defined in crate `pdbtbx`
   --> /home/edik/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pdbtbx-0.12.0/src/structs/pdb.rs:37:1
    |
37  | pub struct PDB {
    | ^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `pdbtbx` are being used?
note: function defined here
   --> /home/edik/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust-sasa-0.2.4/src/lib.rs:236:8
    |
236 | pub fn calculate_sasa(
    |        ^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `haddock-restraints` (bin "haddock-restraints") due to 1 previous error
error: failed to compile `haddock-restraints v0.7.0`, intermediate artifacts can be found at `/tmp/cargo-installV32ICh`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
@rvhonorato
Copy link
Member

Thanks for reporting it, seems like i forgot to fix a dependency lock.

I've just published a new version v0.7.1, which should be fine now, please try again

@edikedik
Copy link
Author

Works now, thanks!

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