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

Error compiling #27

Closed
CastilloDel opened this issue Jul 9, 2021 · 2 comments
Closed

Error compiling #27

CastilloDel opened this issue Jul 9, 2021 · 2 comments
Assignees
Labels
bug Something isn't working fasta

Comments

@CastilloDel
Copy link

While compiling an updated version (c235259) I got the following error

error[E0277]: the type `[u8]` cannot be indexed by `(Bound<usize>, Bound<usize>)`
   --> /home/daniel/.cargo/git/checkouts/noodles-f00ebc122d065317/c235259/noodles-fasta/src/reader.rs:251:36
    |
251 |         Ok(Record::new(definition, sequence[range].to_vec()))
    |                                    ^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
    |
    = help: the trait `SliceIndex<[u8]>` is not implemented for `(Bound<usize>, Bound<usize>)`
    = note: required because of the requirements on the impl of `std::ops::Index<(Bound<usize>, Bound<usize>)>` for `Vec<u8>`
@zaeleus zaeleus closed this as completed in 0968ee6 Jul 9, 2021
@zaeleus
Copy link
Owner

zaeleus commented Jul 9, 2021

Given tests pass for this commit, it must be a new Rust feature, and indeed it is. Added in 1.53.0:

You can now index into slices using (Bound, Bound).

Although you can update Rust to fix the compilation error, I made a small change in 0968ee6 to make it work with older versions.

Note that noodles currently does not have a minimum supported Rust version (MSRV) policy; I typically track the latest stable release.

@zaeleus zaeleus added bug Something isn't working fasta labels Jul 9, 2021
@zaeleus zaeleus self-assigned this Jul 9, 2021
@CastilloDel
Copy link
Author

I'm sorry, that was my bad :( I thought I had the latest version, anyway thanks for answering and the changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fasta
Projects
None yet
Development

No branches or pull requests

2 participants