File tree Expand file tree Collapse file tree 4 files changed +17
-8
lines changed
Images.xcassets/AppIcon.appiconset Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -104,8 +104,8 @@ extension GitHubSearchRepositoriesAPI {
104
104
for m in matches {
105
105
let matches = ( 1 ..< m. numberOfRanges) . map { rangeIndex -> String in
106
106
let range = m. range ( at: rangeIndex)
107
- let startIndex = links. characters . index ( links. startIndex, offsetBy: range. location)
108
- let endIndex = links. characters . index ( links. startIndex, offsetBy: range. location + range. length)
107
+ let startIndex = links. index ( links. startIndex, offsetBy: range. location)
108
+ let endIndex = links. index ( links. startIndex, offsetBy: range. location + range. length)
109
109
return String ( links [ startIndex ..< endIndex] )
110
110
}
111
111
Original file line number Diff line number Diff line change @@ -29,10 +29,9 @@ class GitHubDefaultValidationService: GitHubValidationService {
29
29
let minPasswordCount = 5
30
30
31
31
func validateUsername( _ username: String ) -> Observable < ValidationResult > {
32
- if username. characters . count == 0 {
32
+ if username. isEmpty {
33
33
return . just( . empty)
34
34
}
35
-
36
35
37
36
// this obviously won't be
38
37
if username. rangeOfCharacter ( from: CharacterSet . alphanumerics. inverted) != nil {
@@ -55,7 +54,7 @@ class GitHubDefaultValidationService: GitHubValidationService {
55
54
}
56
55
57
56
func validatePassword( _ password: String ) -> ValidationResult {
58
- let numberOfCharacters = password. characters . count
57
+ let numberOfCharacters = password. count
59
58
if numberOfCharacters == 0 {
60
59
return . empty
61
60
}
@@ -68,7 +67,7 @@ class GitHubDefaultValidationService: GitHubValidationService {
68
67
}
69
68
70
69
func validateRepeatedPassword( _ password: String , repeatedPassword: String ) -> ValidationResult {
71
- if repeatedPassword. characters . count == 0 {
70
+ if repeatedPassword. count == 0 {
72
71
return . empty
73
72
}
74
73
Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ class SimpleValidationViewController : ViewController {
30
30
passwordValidOutlet. text = " Password has to be at least \( minimalPasswordLength) characters "
31
31
32
32
let usernameValid = usernameOutlet. rx. text. orEmpty
33
- . map { $0. characters . count >= minimalUsernameLength }
33
+ . map { $0. count >= minimalUsernameLength }
34
34
. share ( replay: 1 ) // without this map would be executed once for each binding, rx is stateless by default
35
35
36
36
let passwordValid = passwordOutlet. rx. text. orEmpty
37
- . map { $0. characters . count >= minimalPasswordLength }
37
+ . map { $0. count >= minimalPasswordLength }
38
38
. share ( replay: 1 )
39
39
40
40
let everythingValid = Observable . combineLatest ( usernameValid, passwordValid) { $0 && $1 }
Original file line number Diff line number Diff line change 131
131
"filename" : " Rx_Logo-iPad.png" ,
132
132
"scale" : " 2x"
133
133
},
134
+ {
135
+ "idiom" : " ios-marketing" ,
136
+ "size" : " 1024x1024" ,
137
+ "scale" : " 1x"
138
+ },
134
139
{
135
140
"size" : " 24x24" ,
136
141
"idiom" : " watch" ,
186
191
"role" : " quickLook" ,
187
192
"subtype" : " 42mm"
188
193
},
194
+ {
195
+ "idiom" : " watch-marketing" ,
196
+ "size" : " 1024x1024" ,
197
+ "scale" : " 1x"
198
+ },
189
199
{
190
200
"idiom" : " mac" ,
191
201
"size" : " 16x16" ,
You can’t perform that action at this time.
0 commit comments