@@ -177,22 +177,35 @@ public class RxTableViewSectionedDataSource<S: SectionModelType>
177
177
}
178
178
179
179
override func _tableView( tableView: UITableView , canEditRowAtIndexPath indexPath: NSIndexPath ) -> Bool {
180
- return canEditRowAtIndexPath ? ( self , indexPath: indexPath) ??
181
- super. _tableView ( tableView, canMoveRowAtIndexPath: indexPath)
180
+ guard let canEditRow = canEditRowAtIndexPath ? ( self , indexPath: indexPath) else {
181
+ return super. _tableView ( tableView, canMoveRowAtIndexPath: indexPath)
182
+ }
183
+
184
+ return canEditRow
182
185
}
183
186
184
187
override func _tableView( tableView: UITableView , canMoveRowAtIndexPath indexPath: NSIndexPath ) -> Bool {
185
- return canMoveRowAtIndexPath ? ( self , indexPath: indexPath) ??
186
- super. _tableView ( tableView, canMoveRowAtIndexPath: indexPath)
188
+ guard let canMoveRow = canMoveRowAtIndexPath ? ( self , indexPath: indexPath) else {
189
+ return super. _tableView ( tableView, canMoveRowAtIndexPath: indexPath)
190
+ }
191
+
192
+ return canMoveRow
187
193
}
188
194
189
195
override func _sectionIndexTitlesForTableView( tableView: UITableView ) -> [ String ] ? {
190
- return sectionIndexTitles ? ( self ) ?? super. _sectionIndexTitlesForTableView ( tableView)
196
+ guard let titles = sectionIndexTitles ? ( self ) else {
197
+ return super. _sectionIndexTitlesForTableView ( tableView)
198
+ }
199
+
200
+ return titles
191
201
}
192
202
193
203
override func _tableView( tableView: UITableView , sectionForSectionIndexTitle title: String , atIndex index: Int ) -> Int {
194
- return sectionForSectionIndexTitle ? ( self , title: title, index: index) ??
195
- super. _tableView ( tableView, sectionForSectionIndexTitle: title, atIndex: index)
204
+ guard let section = sectionForSectionIndexTitle ? ( self , title: title, index: index) else {
205
+ return super. _tableView ( tableView, sectionForSectionIndexTitle: title, atIndex: index)
206
+ }
207
+
208
+ return section
196
209
}
197
210
198
211
}
0 commit comments