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

Bump minimum dsi-bitstream version #77

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Conversation

progval
Copy link
Contributor

@progval progval commented Feb 7, 2024

To fix this error:

error[E0277]: `dyn std::error::Error` cannot be sent between threads safely
   --> src/graphs/bvgraph/comp/util.rs:332:74
    |
332 |                 result_writer.copy_from(&mut reader, bits_to_copy as u64)?;
    |                                                                          ^ `dyn std::error::Error` cannot be sent between threads safely
    |
    = help: the trait `Send` is not implemented for `dyn std::error::Error`
    = help: the following other types implement trait `std::ops::FromResidual<R>`:
              <Result<T, F> as std::ops::FromResidual<Yeet<E>>>
              <Result<T, F> as std::ops::FromResidual<Result<Infallible, E>>>
    = note: required for `std::ptr::Unique<dyn std::error::Error>` to implement `Send`
note: required because it appears within the type `Box<dyn Error>`
   --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:195:12
    = note: required for `anyhow::Error` to implement `From<Box<dyn std::error::Error>>`
    = note: required for `Result<usize, anyhow::Error>` to implement `std::ops::FromResidual<Result<Infallible, Box<dyn std::error::Error>>>`

error[E0277]: `dyn std::error::Error` cannot be shared between threads safely
   --> src/graphs/bvgraph/comp/util.rs:332:74
    |
332 |                 result_writer.copy_from(&mut reader, bits_to_copy as u64)?;
    |                                                                          ^ `dyn std::error::Error` cannot be shared between threads safely
    |
    = help: the trait `Sync` is not implemented for `dyn std::error::Error`
    = help: the following other types implement trait `std::ops::FromResidual<R>`:
              <Result<T, F> as std::ops::FromResidual<Yeet<E>>>
              <Result<T, F> as std::ops::FromResidual<Result<Infallible, E>>>
    = note: required for `std::ptr::Unique<dyn std::error::Error>` to implement `Sync`
note: required because it appears within the type `Box<dyn Error>`
   --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:195:12
    = note: required for `anyhow::Error` to implement `From<Box<dyn std::error::Error>>`
    = note: required for `Result<usize, anyhow::Error>` to implement `std::ops::FromResidual<Result<Infallible, Box<dyn std::error::Error>>>`

error[E0277]: the size for values of type `dyn std::error::Error` cannot be known at compilation time
   --> src/graphs/bvgraph/comp/util.rs:332:74
    |
332 |                 result_writer.copy_from(&mut reader, bits_to_copy as u64)?;
    |                                                                          ^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `dyn std::error::Error`
    = help: the following other types implement trait `std::ops::FromResidual<R>`:
              <Result<T, F> as std::ops::FromResidual<Yeet<E>>>
              <Result<T, F> as std::ops::FromResidual<Result<Infallible, E>>>
    = note: required for `Box<dyn std::error::Error>` to implement `std::error::Error`
    = note: required for `anyhow::Error` to implement `From<Box<dyn std::error::Error>>`
    = note: required for `Result<usize, anyhow::Error>` to implement `std::ops::FromResidual<Result<Infallible, Box<dyn std::error::Error>>>`

To fix this error:

```
error[E0277]: `dyn std::error::Error` cannot be sent between threads safely
   --> src/graphs/bvgraph/comp/util.rs:332:74
    |
332 |                 result_writer.copy_from(&mut reader, bits_to_copy as u64)?;
    |                                                                          ^ `dyn std::error::Error` cannot be sent between threads safely
    |
    = help: the trait `Send` is not implemented for `dyn std::error::Error`
    = help: the following other types implement trait `std::ops::FromResidual<R>`:
              <Result<T, F> as std::ops::FromResidual<Yeet<E>>>
              <Result<T, F> as std::ops::FromResidual<Result<Infallible, E>>>
    = note: required for `std::ptr::Unique<dyn std::error::Error>` to implement `Send`
note: required because it appears within the type `Box<dyn Error>`
   --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:195:12
    = note: required for `anyhow::Error` to implement `From<Box<dyn std::error::Error>>`
    = note: required for `Result<usize, anyhow::Error>` to implement `std::ops::FromResidual<Result<Infallible, Box<dyn std::error::Error>>>`

error[E0277]: `dyn std::error::Error` cannot be shared between threads safely
   --> src/graphs/bvgraph/comp/util.rs:332:74
    |
332 |                 result_writer.copy_from(&mut reader, bits_to_copy as u64)?;
    |                                                                          ^ `dyn std::error::Error` cannot be shared between threads safely
    |
    = help: the trait `Sync` is not implemented for `dyn std::error::Error`
    = help: the following other types implement trait `std::ops::FromResidual<R>`:
              <Result<T, F> as std::ops::FromResidual<Yeet<E>>>
              <Result<T, F> as std::ops::FromResidual<Result<Infallible, E>>>
    = note: required for `std::ptr::Unique<dyn std::error::Error>` to implement `Sync`
note: required because it appears within the type `Box<dyn Error>`
   --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:195:12
    = note: required for `anyhow::Error` to implement `From<Box<dyn std::error::Error>>`
    = note: required for `Result<usize, anyhow::Error>` to implement `std::ops::FromResidual<Result<Infallible, Box<dyn std::error::Error>>>`

error[E0277]: the size for values of type `dyn std::error::Error` cannot be known at compilation time
   --> src/graphs/bvgraph/comp/util.rs:332:74
    |
332 |                 result_writer.copy_from(&mut reader, bits_to_copy as u64)?;
    |                                                                          ^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `dyn std::error::Error`
    = help: the following other types implement trait `std::ops::FromResidual<R>`:
              <Result<T, F> as std::ops::FromResidual<Yeet<E>>>
              <Result<T, F> as std::ops::FromResidual<Result<Infallible, E>>>
    = note: required for `Box<dyn std::error::Error>` to implement `std::error::Error`
    = note: required for `anyhow::Error` to implement `From<Box<dyn std::error::Error>>`
    = note: required for `Result<usize, anyhow::Error>` to implement `std::ops::FromResidual<Result<Infallible, Box<dyn std::error::Error>>>`
```
@vigna vigna merged commit 50ca0ad into vigna:main Feb 7, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants