Skip to content

Commit

Permalink
Merge pull request #17 from SlaunchaMan/fix-encoded-offset-warning
Browse files Browse the repository at this point in the history
Fix warning for deprecated method.
  • Loading branch information
f-meloni committed Dec 7, 2020
2 parents 5551b2f + 7e86a86 commit 6e7415d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/PackageConfig/DynamicLibraries.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ enum DynamicLibraries {
.map(String.init)
.map {
guard let comment = $0.range(of: "//")?.lowerBound else { return $0 }
return String($0.prefix(comment.encodedOffset))
return String($0[..<comment])
}
.joined()
.replacingOccurrences(of: "\t", with: "")
Expand Down

0 comments on commit 6e7415d

Please sign in to comment.