remove checks in replace method

This commit is contained in:
Max Sokolov 2016-09-02 21:11:30 +03:00
parent 1df6447d73
commit aeae61d48b
2 changed files with 3 additions and 8 deletions

View File

@ -26,7 +26,7 @@ struct TableKitNotifications {
/**
A custom action that you can trigger from your cell.
You can eacily catch actions using a chaining manner with your row builder.
You can easily catch actions using a chaining manner with your row.
*/
public class TableCellAction {

View File

@ -84,13 +84,8 @@ public class TableSection {
self.rows.insertContentsOf(rows, at: index)
}
public func replace(rowAt index: Int, with row: Row) -> Bool {
if index >= 0 && index < rows.count {
rows[index] = row
return true
}
return false
public func replace(rowAt index: Int, with row: Row) {
rows[index] = row
}
public func delete(index index: Int) {