Skip to content

Commit

Permalink
Fix trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Wevah committed Jul 13, 2022
1 parent 166d705 commit daeec52
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ init?(unicodeString: String)
```objc
+ (nullable instancetype)URLWithUnicodeString:(NSString *)URLString;
```

Convenience initializer equivalent to `URL(string: unicodeString.encodedURLString)`/ `[NSURL URLWithString:URLString.encodedURLString]`.

-----
Expand Down
4 changes: 2 additions & 2 deletions Sources/IDNA/String+IDNA.swift
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ private extension StringProtocol {

let index = result.unicodeScalars.index(result.unicodeScalars.startIndex, offsetBy: Int(i))
result.unicodeScalars.insert(UnicodeScalar(n)!, at: index)

outLen += 1
i += 1
}
Expand Down Expand Up @@ -464,7 +464,7 @@ private extension String {
/// See [RFC 5892, Appendix A.1 and A.2](https://tools.ietf.org/html/rfc5892#appendix-A).
var hasValidJoiners: Bool {
try! UTS46.loadIfNecessary()

let scalars = self.unicodeScalars

for index in scalars.indices {
Expand Down
2 changes: 1 addition & 1 deletion Sources/IDNA/UTS46+Loading.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extension UTS46 {
} else {
print("uts46 data file is missing!")
}

throw CocoaError(.fileNoSuchFile)
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/IDNA/UTS46.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class UTS46 {

if flags.hasCRC {
guard rawValue.count >= 12 else { return nil }

let crcStart = rawValue.index(rawValue.startIndex, offsetBy: 8)

crc = rawValue.withUnsafeBytes { (buffer: UnsafeRawBufferPointer) in
Expand Down

0 comments on commit daeec52

Please sign in to comment.