zaeleus / noodles

Bioinformatics I/O libraries in Rust
MIT License
477 stars 53 forks source link

Installation error #231

Closed andyjslee closed 6 months ago

andyjslee commented 6 months ago

I get the following error when I try to install noodles:

error[E0277]: the trait bound `Vec<_, _>: From<&[u8; 13]>` is not satisfied
   --> /path/.cargo/.../noodles-sam-0.51.0/src/record/fields.rs:129:28
    |
129 |             buf: Vec::from(b"*4*0255**00**"),
    |                  --------- ^^^^^^^^^^^^^^^^ the trait `From<&[u8; 13]>` is not implemented for `Vec<_, _>`
    |                  |
    |                  required by a bound introduced by this call
    |
    = help: the following other types implement trait `From<T>`:
              <Vec<u8> as From<bytes::bytes::Bytes>>
              <Vec<u8> as From<bytes::bytes_mut::BytesMut>>
              <Vec<u8> as From<BString>>
              <Vec<u8> as From<alignment::record_buf::name::Name>>
              <Vec<u8> as From<alignment::record_buf::quality_scores::QualityScores>>
              <Vec<u8> as From<alignment::record_buf::sequence::Sequence>>
              <Vec<u8> as From<CString>>
              <Vec<u8> as From<String>>
            and 10 others

For more information about this error, try `rustc --explain E0277`.
error: could not compile `noodles-sam` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...

I have the following line added to Cargo.toml:

noodles = { version = "0.62.1", features = ["bam"] }
zaeleus commented 6 months ago

Are you able to update to the latest version of Rust (or at least 1.74.0+)?

andyjslee commented 6 months ago

Updating to the latest version of Rust fixed the issue. Thanks!