Skip to content

bug: impl Discover for Arc<T> incorrect #3489

@dpc

Description

@dpc

impl<T: Discovery> Discovery for Arc<T> {}

The following line:

impl<T: Discovery> Discovery for Arc<T> {}

makes it so that if someone changes/incorrectly writes:

builder.add_discovery(|_| Arc::new(Foo)));

instead of

builder.add_discovery(|_| Foo);

the code suddenly does nothing because default impls for methods on Discovery will just ignore the T/Foo.

//! reliable default choice.

For whatever reason we did it in our code, and it was such a weird bug to debug. :D

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions