mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[gardening] Remove redundant nil-initialization of optional variable
From the Swift documentation: "If you define an optional variable without providing a default value, the variable is automatically set to nil for you."
This commit is contained in:
@@ -33,7 +33,7 @@ PrintTests.test("Printable") {
|
||||
|
||||
PrintTests.test("custom string convertible structs") {
|
||||
struct Wrapper : CustomStringConvertible {
|
||||
var x: CustomStringConvertible? = nil
|
||||
var x: CustomStringConvertible?
|
||||
|
||||
var description: String {
|
||||
return "Wrapper(\(x.debugDescription))"
|
||||
|
||||
Reference in New Issue
Block a user