Skip to content

Commit 12a72cd

Browse files
committed
Don't dangle return values of methods taking references to self if the return type is a Result.
1 parent eb19364 commit 12a72cd

19 files changed

+53
-53
lines changed

out/VersionDescriptor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
extension Bindings {
77
public class func getLDKSwiftBindingsSerializationHash() -> String {
8-
return "aa6f30a3db94ea30b2790da44a24edca61205baa4e9893da31e33a98e7b66c65"
8+
return "4e8c574f7430b4e821f96c72b92afac96f4d156550f5a48f37368294157986bd"
99
}
1010
public class func getLDKSwiftBindingsVersion() -> String {
11-
return "0.0.114-18-g3ec14fd1-dirty"
11+
return "0.0.114-19-geb193641-dirty"
1212
}
1313
public class func getLDKSwiftBindingsCommitHash() -> String {
14-
return "3ec14fd17fe15bd5e450b0363369ad88db93288b"
14+
return "eb193641b9e7ace910c8a0f20c330230f00ec6dd"
1515
}
1616
}
1717

out/structs/ChainMonitor.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187

188188

189189
// return value (do some wrapping)
190-
let returnValue = Result_LockedChannelMonitorNoneZ(cType: nativeCallResult, instantiationContext: "ChainMonitor.swift::\(#function):\(#line)", anchor: self)
190+
let returnValue = Result_LockedChannelMonitorNoneZ(cType: nativeCallResult, instantiationContext: "ChainMonitor.swift::\(#function):\(#line)", anchor: self).dangle(false)
191191

192192

193193
return returnValue
@@ -271,7 +271,7 @@
271271

272272

273273
// return value (do some wrapping)
274-
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChainMonitor.swift::\(#function):\(#line)", anchor: self)
274+
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChainMonitor.swift::\(#function):\(#line)", anchor: self).dangle(false)
275275

276276

277277
return returnValue

out/structs/ChannelManager.swift

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280

281281

282282
// return value (do some wrapping)
283-
let returnValue = Result__u832APIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
283+
let returnValue = Result__u832APIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
284284

285285

286286
return returnValue
@@ -412,7 +412,7 @@
412412

413413

414414
// return value (do some wrapping)
415-
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
415+
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
416416

417417

418418
return returnValue
@@ -464,7 +464,7 @@
464464

465465

466466
// return value (do some wrapping)
467-
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
467+
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
468468

469469

470470
return returnValue
@@ -501,7 +501,7 @@
501501

502502

503503
// return value (do some wrapping)
504-
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
504+
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
505505

506506

507507
return returnValue
@@ -540,7 +540,7 @@
540540

541541

542542
// return value (do some wrapping)
543-
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
543+
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
544544

545545

546546
return returnValue
@@ -693,7 +693,7 @@
693693

694694

695695
// return value (do some wrapping)
696-
let returnValue = Result_NonePaymentSendFailureZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
696+
let returnValue = Result_NonePaymentSendFailureZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
697697

698698

699699
return returnValue
@@ -734,7 +734,7 @@
734734

735735

736736
// return value (do some wrapping)
737-
let returnValue = Result_NoneRetryableSendFailureZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
737+
let returnValue = Result_NoneRetryableSendFailureZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
738738

739739

740740
return returnValue
@@ -830,7 +830,7 @@
830830

831831

832832
// return value (do some wrapping)
833-
let returnValue = Result_PaymentHashPaymentSendFailureZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
833+
let returnValue = Result_PaymentHashPaymentSendFailureZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
834834

835835

836836
return returnValue
@@ -871,7 +871,7 @@
871871

872872

873873
// return value (do some wrapping)
874-
let returnValue = Result_PaymentHashRetryableSendFailureZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
874+
let returnValue = Result_PaymentHashRetryableSendFailureZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
875875

876876

877877
return returnValue
@@ -900,7 +900,7 @@
900900

901901

902902
// return value (do some wrapping)
903-
let returnValue = Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
903+
let returnValue = Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
904904

905905

906906
return returnValue
@@ -968,7 +968,7 @@
968968

969969

970970
// return value (do some wrapping)
971-
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
971+
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
972972

973973

974974
return returnValue
@@ -1025,7 +1025,7 @@
10251025

10261026

10271027
// return value (do some wrapping)
1028-
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
1028+
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
10291029

10301030

10311031
return returnValue
@@ -1083,7 +1083,7 @@
10831083

10841084

10851085
// return value (do some wrapping)
1086-
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
1086+
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
10871087

10881088

10891089
return returnValue
@@ -1117,7 +1117,7 @@
11171117

11181118

11191119
// return value (do some wrapping)
1120-
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
1120+
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
11211121

11221122

11231123
return returnValue
@@ -1372,7 +1372,7 @@
13721372

13731373

13741374
// return value (do some wrapping)
1375-
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
1375+
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
13761376

13771377

13781378
return returnValue
@@ -1428,7 +1428,7 @@
14281428

14291429

14301430
// return value (do some wrapping)
1431-
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
1431+
let returnValue = Result_NoneAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
14321432

14331433

14341434
return returnValue
@@ -1486,7 +1486,7 @@
14861486

14871487

14881488
// return value (do some wrapping)
1489-
let returnValue = Result_C2Tuple_PaymentHashPaymentSecretZNoneZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
1489+
let returnValue = Result_C2Tuple_PaymentHashPaymentSecretZNoneZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
14901490

14911491

14921492
return returnValue
@@ -1519,7 +1519,7 @@
15191519

15201520

15211521
// return value (do some wrapping)
1522-
let returnValue = Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
1522+
let returnValue = Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
15231523

15241524

15251525
return returnValue
@@ -1596,7 +1596,7 @@
15961596

15971597

15981598
// return value (do some wrapping)
1599-
let returnValue = Result_PaymentSecretNoneZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
1599+
let returnValue = Result_PaymentSecretNoneZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
16001600

16011601

16021602
return returnValue
@@ -1634,7 +1634,7 @@
16341634

16351635

16361636
// return value (do some wrapping)
1637-
let returnValue = Result_PaymentSecretAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
1637+
let returnValue = Result_PaymentSecretAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
16381638

16391639

16401640
return returnValue
@@ -1670,7 +1670,7 @@
16701670

16711671

16721672
// return value (do some wrapping)
1673-
let returnValue = Result_PaymentPreimageAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self)
1673+
let returnValue = Result_PaymentPreimageAPIErrorZ(cType: nativeCallResult, instantiationContext: "ChannelManager.swift::\(#function):\(#line)", anchor: self).dangle(false)
16741674

16751675

16761676
return returnValue

out/structs/ChannelMonitor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187

188188

189189
// return value (do some wrapping)
190-
let returnValue = Result_NoneNoneZ(cType: nativeCallResult, instantiationContext: "ChannelMonitor.swift::\(#function):\(#line)", anchor: self)
190+
let returnValue = Result_NoneNoneZ(cType: nativeCallResult, instantiationContext: "ChannelMonitor.swift::\(#function):\(#line)", anchor: self).dangle(false)
191191

192192

193193
return returnValue

out/structs/ClosingTransaction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248

249249

250250
// return value (do some wrapping)
251-
let returnValue = Result_TrustedClosingTransactionNoneZ(cType: nativeCallResult, instantiationContext: "ClosingTransaction.swift::\(#function):\(#line)", anchor: self)
251+
let returnValue = Result_TrustedClosingTransactionNoneZ(cType: nativeCallResult, instantiationContext: "ClosingTransaction.swift::\(#function):\(#line)", anchor: self).dangle(false)
252252

253253

254254
return returnValue

out/structs/CommitmentTransaction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@
313313

314314

315315
// return value (do some wrapping)
316-
let returnValue = Result_TrustedCommitmentTransactionNoneZ(cType: nativeCallResult, instantiationContext: "CommitmentTransaction.swift::\(#function):\(#line)", anchor: self)
316+
let returnValue = Result_TrustedCommitmentTransactionNoneZ(cType: nativeCallResult, instantiationContext: "CommitmentTransaction.swift::\(#function):\(#line)", anchor: self).dangle(false)
317317

318318

319319
return returnValue

out/structs/CounterpartyCommitmentSecrets.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185

186186

187187
// return value (do some wrapping)
188-
let returnValue = Result_NoneNoneZ(cType: nativeCallResult, instantiationContext: "CounterpartyCommitmentSecrets.swift::\(#function):\(#line)", anchor: self)
188+
let returnValue = Result_NoneNoneZ(cType: nativeCallResult, instantiationContext: "CounterpartyCommitmentSecrets.swift::\(#function):\(#line)", anchor: self).dangle(false)
189189

190190

191191
return returnValue

out/structs/FilesystemPersister.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179

180180

181181
// return value (do some wrapping)
182-
let returnValue = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ(cType: nativeCallResult, instantiationContext: "FilesystemPersister.swift::\(#function):\(#line)", anchor: self)
182+
let returnValue = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ(cType: nativeCallResult, instantiationContext: "FilesystemPersister.swift::\(#function):\(#line)", anchor: self).dangle(false)
183183

184184

185185
return returnValue

out/structs/InMemorySigner.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@
716716

717717

718718
// return value (do some wrapping)
719-
let returnValue = Result_CVec_CVec_u8ZZNoneZ(cType: nativeCallResult, instantiationContext: "InMemorySigner.swift::\(#function):\(#line)", anchor: self)
719+
let returnValue = Result_CVec_CVec_u8ZZNoneZ(cType: nativeCallResult, instantiationContext: "InMemorySigner.swift::\(#function):\(#line)", anchor: self).dangle(false)
720720

721721

722722
return returnValue
@@ -757,7 +757,7 @@
757757

758758

759759
// return value (do some wrapping)
760-
let returnValue = Result_CVec_CVec_u8ZZNoneZ(cType: nativeCallResult, instantiationContext: "InMemorySigner.swift::\(#function):\(#line)", anchor: self)
760+
let returnValue = Result_CVec_CVec_u8ZZNoneZ(cType: nativeCallResult, instantiationContext: "InMemorySigner.swift::\(#function):\(#line)", anchor: self).dangle(false)
761761

762762

763763
return returnValue

out/structs/Invoice.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200

201201

202202
// return value (do some wrapping)
203-
let returnValue = Result_NoneSemanticErrorZ(cType: nativeCallResult, instantiationContext: "Invoice.swift::\(#function):\(#line)", anchor: self)
203+
let returnValue = Result_NoneSemanticErrorZ(cType: nativeCallResult, instantiationContext: "Invoice.swift::\(#function):\(#line)", anchor: self).dangle(false)
204204

205205

206206
return returnValue

0 commit comments

Comments
 (0)