Skip to content

fix(rust): Rust example #12

Description

@carlocorradini

Unfortunately, the Rust example does not compile due to waitset.attach(&status_condition)? call.
waitset.attach requires the entity E to implement HasStatusCondition. However, HasStatusCondition<T> is only implemented for DataReader<T>. Therefore, the correct call should be waitset.attach(&reader)?;.

Before:

let status_condition = reader.get_status_condition();
let mut waitset = hdds::WaitSet::new();
waitset.attach(&status_condition)?;

After:

let mut waitset = hdds::WaitSet::new();
waitset.attach(&reader)?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions