mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Remove the switch statement.
This commit is contained in:
parent
6f2176ca57
commit
4fe901bbd4
@ -8,13 +8,6 @@ private func range(patch: Patch<Term>) -> Range<Int> {
|
||||
}
|
||||
|
||||
func unified(diff: Diff, before: String, after: String) -> String {
|
||||
switch diff {
|
||||
case let .Pure(patch):
|
||||
return unified(patch, source: after)
|
||||
|
||||
case .Roll:
|
||||
return ""
|
||||
}
|
||||
return diff.map { (unified($0, source: after), range($0)) }.cata { info, syntax in
|
||||
switch syntax {
|
||||
case .Leaf:
|
||||
|
Loading…
Reference in New Issue
Block a user