8000 Merge pull request #40 from kevindeleon/patch-1 · codedebug/swift-style-guide@63b35a8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 63b35a8

Browse files
committed
Merge pull request github#40 from kevindeleon/patch-1
Corrects code that would fail due to type mismatch
2 parents dec6f54 + e102e26 commit 63b35a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ class Vehicle {
190190
}
191191

192192
func maximumTotalTirePressure(pressurePerWheel: Float) -> Float {
193-
return pressurePerWheel * numberOfWheels
193+
return pressurePerWheel * Float(numberOfWheels)
194194
}
195195
}
196196

@@ -215,7 +215,7 @@ protocol Vehicle {
215215
}
216216

217217
func maximumTotalTirePressure(vehicle: Vehicle, pressurePerWheel: Float) -> Float {
218-
return pressurePerWheel * vehicle.numberOfWheels
218+
return pressurePerWheel * Float(vehicle.numberOfWheels)
219219
}
220220

221221
struct Bicycle: Vehicle {

0 commit comments

Comments
 (0)
0