Skip to content

BoxService is unnecessarily !Sync #697

@SabrinaJewson

Description

@SabrinaJewson

This type doesn’t have any methods accessing the inner value with &self, so by SyncWrapper logic it can be unconditionally Sync — however currently, it never implements the trait.

Options to fix this include:

  • Add an extra dependency on sync_wrapper;
  • Add unsafe code to tower;
  • Wait for SyncWrapper to be added to std.

Opinions on which would be (un)desirable?

Edit: Realized that this doesn’t apply to BoxCloneService, since that type needs Clone and so obviously must be !Sync.

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