Skip to content

Commit

Permalink
Merge pull request #51 from open-swift/07-28
Browse files Browse the repository at this point in the history
Updating to July 28 snapshot
  • Loading branch information
antonmes authored Aug 3, 2016
2 parents ec599fb + 3179f54 commit 079e95a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Data.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extension Data: RangeReplaceableCollection, MutableCollection {
}

#if swift(>=3.0)
public init<S : Sequence where S.Iterator.Element == Byte>(_ elements: S) {
public init<S : Sequence>(_ elements: S) where S.Iterator.Element == Byte {
self.init(Array(elements))
}
#else
Expand All @@ -44,7 +44,7 @@ extension Data: RangeReplaceableCollection, MutableCollection {
#endif

#if swift(>=3.0)
public mutating func replaceSubrange<C : Collection where C.Iterator.Element == Byte>(_ subRange: Range<Int>, with newElements: C) {
public mutating func replaceSubrange<C : Collection>(_ subRange: Range<Int>, with newElements: C) where C.Iterator.Element == Byte {
self.bytes.replaceSubrange(subRange, with: newElements)
}
#else
Expand Down Expand Up @@ -123,7 +123,7 @@ public func == (lhs: Data, rhs: Data) -> Bool {
}

#if swift(>=3.0)
public func += <S : Sequence where S.Iterator.Element == Byte>(lhs: inout Data, rhs: S) {
public func += <S : Sequence>(lhs: inout Data, rhs: S) where S.Iterator.Element == Byte {
return lhs.bytes += rhs
}
#else
Expand Down Expand Up @@ -174,7 +174,7 @@ extension String: DataConvertible {

loop: while true {
switch decoder.decode(&generator) {
case .scalarValue(let char): string.append(char)
case .scalarValue(let char): string.unicodeScalars.append(char)
case .emptyInput: break loop
case .error: throw StringError()
}
Expand Down

0 comments on commit 079e95a

Please # to comment.