[Examples] Use `isEmpty` instead of manual zero-checking
This commit is contained in:
parent
375725578c
commit
79a079dc49
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue