[Examples] Use `isEmpty` instead of manual zero-checking

This commit is contained in:
Fernando Paredes 2015-12-18 08:23:47 -08:00
parent 375725578c
commit 79a079dc49
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ self.usernameOutlet.rx_text
.map { username in
// synchronous validation, nothing special here
if count(username) == 0 {
if username.isEmpty {
// Convenience for constructing synchronous result.
// In case there is mixed synchronous and asychronous code inside the same
// method, this will construct an async result that is resolved immediatelly.