Skip to content

Sequence extension with sorted(by:) function should be internal #279

@qizh

Description

@qizh

public extension Sequence {
func sorted<T: Comparable>(by keyPath: KeyPath<Element, T>) -> [Element] {

So it won't pollute code suggestions for projects using this library.
Also many libraries or projects have similar function implemented, usually with the same definition.

In some cases it can even produce a warning in Xcode 14.
When function with the same name is used in inlinable code when InstantSearchCore is added to the project but is not imported in this specific file.

Warning screenshot

Metadata

Metadata

Assignees

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