File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public class OSRMInstructionFormatter: Formatter {
3131 }
3232
3333 required public init ? ( coder decoder: NSCoder ) {
34- if let version = decoder. decodeObject ( of: NSString . self, forKey: " version " ) as? String {
34+ if let version = decoder. decodeObject ( of: NSString . self, forKey: " version " ) as String ? {
3535 self . version = version
3636 } else {
3737 return nil
@@ -240,7 +240,7 @@ public class OSRMInstructionFormatter: Formatter {
240240 var buffer : NSString ?
241241
242242 if scanner. scanUpTo ( " { " , into: & buffer) {
243- result += buffer as! String
243+ result += buffer! as String
244244 }
245245 guard scanner. scanString ( " { " , into: nil ) else {
246246 continue
@@ -252,7 +252,7 @@ public class OSRMInstructionFormatter: Formatter {
252252 }
253253
254254 if scanner. scanString ( " } " , into: nil ) {
255- if let tokenType = TokenType ( description: token as! String ) {
255+ if let tokenType = TokenType ( description: token! as String ) {
256256 var replacement : String
257257 switch tokenType {
258258 case . wayName: replacement = wayName
@@ -271,7 +271,7 @@ public class OSRMInstructionFormatter: Formatter {
271271 }
272272 }
273273 } else {
274- result += token as! String
274+ result += token! as String
275275 }
276276
277277 }
You can’t perform that action at this time.
0 commit comments