Skip to content

Commit

Permalink
Merge pull request #5 from trill-lang/nits
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
CodaFi authored Nov 20, 2017
2 parents aceb282 + 5ed1849 commit 1c96658
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Sources/FileCheck/CheckString.swift
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ private func diagnoseFailedCheck(
} else {
diagnose(.error,
at: loc,
with: prefix + ": could not find '\(pattern.fixedString)' in input",
with: prefix + ": could not find match for CHECK line",
options: options
)
}
Expand Down
14 changes: 4 additions & 10 deletions Sources/FileCheck/EditDistance.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
///
/// - parameter fa: The first sequence to compare.
/// - parameter ta: The second sequence to compare.
/// - parameter allowReplacements: Whether to allow element replacements (change one
/// element into another) as a single operation, rather than as two operations
/// (an insertion and a removal).
/// - parameter maxEditDistance: If non-zero, the maximum edit distance that this
/// routine is allowed to compute. If the edit distance will exceed that
/// maximum, returns \c MaxEditDistance+1.
///
/// - returns: the minimum number of element insertions, removals, or (if
/// `allowReplacements` is `true`) replacements needed to transform one of
/// the given sequences into the other. If zero, the sequences are identical.
func editDistance(from fa : Substring, to ta : Substring, allowReplacements : Bool = true, maxEditDistance : Int = 0) -> Int {
/// - returns: the minimum number of element insertions, removals, or
/// replacements needed to transform one of the given sequences into the
/// other. If zero, the sequences are identical.
func editDistance(from fa : Substring, to ta : Substring) -> Int {
guard !fa.isEmpty else {
return ta.count
}
Expand Down

0 comments on commit 1c96658

Please sign in to comment.