Skip to content

Commit

Permalink
Remove non-generic generic. (#357)
Browse files Browse the repository at this point in the history
As correctly reported by the nightly compiler, this function appears to
be generic but has a same-type requirement that means it's actually not
generic.
  • Loading branch information
Lukasa authored Apr 22, 2022
1 parent 876748f commit 1750873
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/NIOSSL/SSLContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ internal enum FileSystemObject {
// likes to work with them in wire format, so rather than us decoding them we can just encode ours to
// the wire format and then work with them from there.
private extension UnsafeBufferPointer where Element == UInt8 {
func locateAlpnIdentifier<T>(identifier: UnsafeBufferPointer<T>) -> (index: Int, length: Int)? where T == Element {
func locateAlpnIdentifier(identifier: UnsafeBufferPointer<Element>) -> (index: Int, length: Int)? {
precondition(identifier.count != 0)
let targetLength = Int(identifier[0])

Expand Down

0 comments on commit 1750873

Please sign in to comment.