@@ -112,8 +112,8 @@ extension Duration {
112
112
public static func seconds< T: BinaryInteger > ( _ seconds: T ) -> Duration {
113
113
guard let high = Int64 ( exactly: seconds >> 64 ) else { fatalError ( ) }
114
114
let low = UInt64 ( truncatingIfNeeded: seconds)
115
- var lowScaled = low. multipliedFullWidth ( by: 1_000_000_000_000_000_000 )
116
- var highScaled = high * 1_000_000_000_000_000_000
115
+ let lowScaled = low. multipliedFullWidth ( by: 1_000_000_000_000_000_000 )
116
+ let highScaled = high * 1_000_000_000_000_000_000
117
117
return Duration ( _high: highScaled + Int64( lowScaled. high) , low: lowScaled. low)
118
118
}
119
119
@@ -158,8 +158,8 @@ extension Duration {
158
158
) -> Duration {
159
159
guard let high = Int64 ( exactly: milliseconds >> 64 ) else { fatalError ( ) }
160
160
let low = UInt64 ( truncatingIfNeeded: milliseconds)
161
- var lowScaled = low. multipliedFullWidth ( by: 1_000_000_000_000_000 )
162
- var highScaled = high * 1_000_000_000_000_000
161
+ let lowScaled = low. multipliedFullWidth ( by: 1_000_000_000_000_000 )
162
+ let highScaled = high * 1_000_000_000_000_000
163
163
return Duration ( _high: highScaled + Int64( lowScaled. high) , low: lowScaled. low)
164
164
}
165
165
@@ -187,8 +187,8 @@ extension Duration {
187
187
) -> Duration {
188
188
guard let high = Int64 ( exactly: microseconds >> 64 ) else { fatalError ( ) }
189
189
let low = UInt64 ( truncatingIfNeeded: microseconds)
190
- var lowScaled = low. multipliedFullWidth ( by: 1_000_000_000_000 )
191
- var highScaled = high * 1_000_000_000_000
190
+ let lowScaled = low. multipliedFullWidth ( by: 1_000_000_000_000 )
191
+ let highScaled = high * 1_000_000_000_000
192
192
return Duration ( _high: highScaled + Int64( lowScaled. high) , low: lowScaled. low)
193
193
}
194
194
@@ -216,8 +216,8 @@ extension Duration {
216
216
) -> Duration {
217
217
guard let high = Int64 ( exactly: nanoseconds >> 64 ) else { fatalError ( ) }
218
218
let low = UInt64 ( truncatingIfNeeded: nanoseconds)
219
- var lowScaled = low. multipliedFullWidth ( by: 1_000_000_000 )
220
- var highScaled = high * 1_000_000_000
219
+ let lowScaled = low. multipliedFullWidth ( by: 1_000_000_000 )
220
+ let highScaled = high * 1_000_000_000
221
221
return Duration ( _high: highScaled + Int64( lowScaled. high) , low: lowScaled. low)
222
222
}
223
223
}
0 commit comments