Skip to content

attributes: compilation error in 0.1.17 #1615

Closed
@hawkw

Description

@hawkw

In our case, this triggered compilation error. It worked on 0.1.16 or by removing instrument

   --> crates/fluvio/src/consumer.rs:304:79
    |
304 |       ) -> Result<impl Stream<Item = Result<Record, FluvioError>>, FluvioError> {
    |  _______________________________________________________________________________^
305 | |         let stream = self.stream_batches_with_config(offset, config).await?;
306 | |         let partition = self.partition;
307 | |         let flattened =
...   |
325 | |         Ok(flattened)
326 | |     }
    | |_____^ expected closure, found a different closure
...
358 |       ) -> Result<impl Stream<Item = Result<Batch, FluvioError>>, FluvioError> {
    |                   ----------------------------------------------
    |                   |
    |                   the expected opaque type
    |                   the found opaque type
    |
    = note: expected enum `Result<futures_util::stream::FlatMap<_, Either<futures_util::stream::Iter<std::iter::Map<_, [closure@crates/fluvio/src/consumer.rs:313:25: 319:26]>>, _>, [closure@crates/fluvio/src/consumer.rs:308:29: 323:14]>, FluvioError>`
               found enum `Result<futures_util::stream::FlatMap<_, Either<futures_util::stream::Iter<std::iter::Map<_, [closure@crates/fluvio/src/consumer.rs:313:25: 319:26]>>, _>, [closure@crates/fluvio/src/consumer.rs:308:29: 323:14]>, _>`
    = note: no two closures, even if identical, have the same type
    = help: consider boxing your closure and/or using it as a trait object

Originally posted by @sehz in #1613 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions