I'm looking for a way to improve this pattern of code:
struct Struct {
let i: Int
init?(i: Int?) {
guard let unwrappedI = i else { return nil }
self.i = unwrappedI
}
}
It'd be nice to remove the unwrappedI
temporary variable. Any suggestions?