mirror of
https://github.com/github/semantic.git
synced 2024-12-01 17:59:10 +03:00
No need to compute layouts we’re not going to use.
This commit is contained in:
parent
420dd640b8
commit
f9de814a35
@ -188,8 +188,8 @@ private enum Layout: CustomStringConvertible, Equatable {
|
||||
}
|
||||
}
|
||||
|
||||
static func better(width: Int, _ placed: Int, _ x: Layout, _ y: Layout) -> Layout {
|
||||
return x.fits(width - placed) ? x : y
|
||||
static func better(width: Int, _ placed: Int, _ x: Layout, @autoclosure _ y: () -> Layout) -> Layout {
|
||||
return x.fits(width - placed) ? x : y()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user