             }
             return PartialLine(input: result)
         }
-
+        
         // This method will attempt to shift the run specified by the amount specified.
         // If it can shift that run without bumping into that subsequent run, it
         // returns true. Otherwise, if it attempts, recursively, to move the subsequent

            }
            totalLineSlop = lineLength - consumedSpace
        }

        private func runOffset(targetRun: Run) -> Int {
            var i = 0
            var firstRun = true

                    run = potentialLine.runAtOffset(i)!
                    offsetToShift = i + 1 - potentialLine.runOffset(run)
                }
                
                if (!potentialLine.shiftRun(run, offset: offsetToShift)) {
                    return false
                }
            }
        }
        
        return true
    }
    
    private struct PackedLine {
        private var runs: [Run] = []
        private let lineLength: Int
        private let totalLineSlop: Int
        
        private class Run {
            var extraLeadingSpace: Int
            let index: Int
            let length: Int
            
            init(extraLeadingSpace: Int, index: Int, length: Int) {
                self.extraLeadingSpace = extraLeadingSpace
                self.index = index
                self.length = length
            }
        }
        
        
        init(rules: [Int], lineLength: Int) {
            self.lineLength = lineLength
            var i = 0
