Skip to content

Commit a68b4f5

Browse files
committed
fix: method name cannot be the same as struct property name
1 parent 6fdce58 commit a68b4f5

File tree

11 files changed

+195
-33
lines changed

11 files changed

+195
-33
lines changed

ios/Classes/frb_generated.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ void frbgen_boltz_wire__crate__api__chain_swap__chain_swap_refund(int64_t port_,
330330
void frbgen_boltz_wire__crate__api__chain_swap__chain_swap_to_json(int64_t port_,
331331
struct wire_cst_chain_swap *that);
332332

333-
void frbgen_boltz_wire__crate__api__error__boltz_error_message(int64_t port_,
334-
struct wire_cst_boltz_error *that);
333+
void frbgen_boltz_wire__crate__api__error__boltz_error_detail(int64_t port_,
334+
struct wire_cst_boltz_error *that);
335335

336336
void frbgen_boltz_wire__crate__api__error__boltz_error_new(int64_t port_,
337337
struct wire_cst_list_prim_u_8_strict *kind,
@@ -534,7 +534,7 @@ static int64_t dummy_method_to_enforce_bundling(void) {
534534
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__chain_swap__chain_swap_new_swap);
535535
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__chain_swap__chain_swap_refund);
536536
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__chain_swap__chain_swap_to_json);
537-
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__error__boltz_error_message);
537+
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__error__boltz_error_detail);
538538
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__error__boltz_error_new);
539539
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__fees__fees_chain);
540540
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__fees__fees_new);

lib/src/generated/api/error.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ class BoltzError with _$BoltzError implements FrbException {
1717
required String kind,
1818
required String message,
1919
}) = _BoltzError;
20-
Future<void> message() =>
21-
BoltzCore.instance.api.crateApiErrorBoltzErrorMessage(
20+
Future<void> detail() => BoltzCore.instance.api.crateApiErrorBoltzErrorDetail(
2221
that: this,
2322
);
2423

lib/src/generated/api/error.freezed.dart

Lines changed: 163 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/generated/frb_generated.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class BoltzCore
6262
String get codegenVersion => '2.0.0';
6363

6464
@override
65-
int get rustContentHash => 342652895;
65+
int get rustContentHash => 1150231082;
6666

6767
static const kDefaultExternalLibraryLoaderConfig =
6868
ExternalLibraryLoaderConfig(
@@ -206,7 +206,7 @@ abstract class BoltzCoreApi extends BaseApi {
206206

207207
Future<String> crateApiChainSwapChainSwapToJson({required ChainSwap that});
208208

209-
Future<void> crateApiErrorBoltzErrorMessage({required BoltzError that});
209+
Future<void> crateApiErrorBoltzErrorDetail({required BoltzError that});
210210

211211
Future<BoltzError> crateApiErrorBoltzErrorNew(
212212
{required String kind, required String message});
@@ -1200,25 +1200,25 @@ class BoltzCoreApiImpl extends BoltzCoreApiImplPlatform
12001200
);
12011201

12021202
@override
1203-
Future<void> crateApiErrorBoltzErrorMessage({required BoltzError that}) {
1203+
Future<void> crateApiErrorBoltzErrorDetail({required BoltzError that}) {
12041204
return handler.executeNormal(NormalTask(
12051205
callFfi: (port_) {
12061206
var arg0 = cst_encode_box_autoadd_boltz_error(that);
1207-
return wire.wire__crate__api__error__boltz_error_message(port_, arg0);
1207+
return wire.wire__crate__api__error__boltz_error_detail(port_, arg0);
12081208
},
12091209
codec: DcoCodec(
12101210
decodeSuccessData: dco_decode_unit,
12111211
decodeErrorData: null,
12121212
),
1213-
constMeta: kCrateApiErrorBoltzErrorMessageConstMeta,
1213+
constMeta: kCrateApiErrorBoltzErrorDetailConstMeta,
12141214
argValues: [that],
12151215
apiImpl: this,
12161216
));
12171217
}
12181218

1219-
TaskConstMeta get kCrateApiErrorBoltzErrorMessageConstMeta =>
1219+
TaskConstMeta get kCrateApiErrorBoltzErrorDetailConstMeta =>
12201220
const TaskConstMeta(
1221-
debugName: "boltz_error_message",
1221+
debugName: "boltz_error_detail",
12221222
argNames: ["that"],
12231223
);
12241224

lib/src/generated/frb_generated.io.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,22 +1685,22 @@ class BoltzCoreWire implements BaseWire {
16851685
_wire__crate__api__chain_swap__chain_swap_to_jsonPtr
16861686
.asFunction<void Function(int, ffi.Pointer<wire_cst_chain_swap>)>();
16871687

1688-
void wire__crate__api__error__boltz_error_message(
1688+
void wire__crate__api__error__boltz_error_detail(
16891689
int port_,
16901690
ffi.Pointer<wire_cst_boltz_error> that,
16911691
) {
1692-
return _wire__crate__api__error__boltz_error_message(
1692+
return _wire__crate__api__error__boltz_error_detail(
16931693
port_,
16941694
that,
16951695
);
16961696
}
16971697

1698-
late final _wire__crate__api__error__boltz_error_messagePtr = _lookup<
1698+
late final _wire__crate__api__error__boltz_error_detailPtr = _lookup<
16991699
ffi.NativeFunction<
17001700
ffi.Void Function(ffi.Int64, ffi.Pointer<wire_cst_boltz_error>)>>(
1701-
'frbgen_boltz_wire__crate__api__error__boltz_error_message');
1702-
late final _wire__crate__api__error__boltz_error_message =
1703-
_wire__crate__api__error__boltz_error_messagePtr
1701+
'frbgen_boltz_wire__crate__api__error__boltz_error_detail');
1702+
late final _wire__crate__api__error__boltz_error_detail =
1703+
_wire__crate__api__error__boltz_error_detailPtr
17041704
.asFunction<void Function(int, ffi.Pointer<wire_cst_boltz_error>)>();
17051705

17061706
void wire__crate__api__error__boltz_error_new(

lib/src/generated/frb_generated.web.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,9 +1079,9 @@ class BoltzCoreWire implements BaseWire {
10791079
NativePortType port_, JSAny that) =>
10801080
wasmModule.wire__crate__api__chain_swap__chain_swap_to_json(port_, that);
10811081

1082-
void wire__crate__api__error__boltz_error_message(
1082+
void wire__crate__api__error__boltz_error_detail(
10831083
NativePortType port_, JSAny that) =>
1084-
wasmModule.wire__crate__api__error__boltz_error_message(port_, that);
1084+
wasmModule.wire__crate__api__error__boltz_error_detail(port_, that);
10851085

10861086
void wire__crate__api__error__boltz_error_new(
10871087
NativePortType port_, String kind, String message) =>
@@ -1467,7 +1467,7 @@ extension type BoltzCoreWasmModule._(JSObject _) implements JSObject {
14671467
external void wire__crate__api__chain_swap__chain_swap_to_json(
14681468
NativePortType port_, JSAny that);
14691469

1470-
external void wire__crate__api__error__boltz_error_message(
1470+
external void wire__crate__api__error__boltz_error_detail(
14711471
NativePortType port_, JSAny that);
14721472

14731473
external void wire__crate__api__error__boltz_error_new(

macos/Classes/frb_generated.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ void frbgen_boltz_wire__crate__api__chain_swap__chain_swap_refund(int64_t port_,
330330
void frbgen_boltz_wire__crate__api__chain_swap__chain_swap_to_json(int64_t port_,
331331
struct wire_cst_chain_swap *that);
332332

333-
void frbgen_boltz_wire__crate__api__error__boltz_error_message(int64_t port_,
334-
struct wire_cst_boltz_error *that);
333+
void frbgen_boltz_wire__crate__api__error__boltz_error_detail(int64_t port_,
334+
struct wire_cst_boltz_error *that);
335335

336336
void frbgen_boltz_wire__crate__api__error__boltz_error_new(int64_t port_,
337337
struct wire_cst_list_prim_u_8_strict *kind,
@@ -534,7 +534,7 @@ static int64_t dummy_method_to_enforce_bundling(void) {
534534
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__chain_swap__chain_swap_new_swap);
535535
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__chain_swap__chain_swap_refund);
536536
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__chain_swap__chain_swap_to_json);
537-
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__error__boltz_error_message);
537+
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__error__boltz_error_detail);
538538
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__error__boltz_error_new);
539539
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__fees__fees_chain);
540540
dummy_var ^= ((int64_t) (void*) frbgen_boltz_wire__crate__api__fees__fees_new);

rust/src/api/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl BoltzError {
1717
}
1818
}
1919

20-
pub fn message(&self) -> &str {
20+
pub fn detail(&self) -> &str {
2121
&self.message
2222
}
2323
}

rust/src/frb_generated.io.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,11 +1004,11 @@ pub extern "C" fn frbgen_boltz_wire__crate__api__chain_swap__chain_swap_to_json(
10041004
}
10051005

10061006
#[no_mangle]
1007-
pub extern "C" fn frbgen_boltz_wire__crate__api__error__boltz_error_message(
1007+
pub extern "C" fn frbgen_boltz_wire__crate__api__error__boltz_error_detail(
10081008
port_: i64,
10091009
that: *mut wire_cst_boltz_error,
10101010
) {
1011-
wire__crate__api__error__boltz_error_message_impl(port_, that)
1011+
wire__crate__api__error__boltz_error_detail_impl(port_, that)
10121012
}
10131013

10141014
#[no_mangle]

rust/src/frb_generated.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ flutter_rust_bridge::frb_generated_boilerplate!(
3737
default_rust_auto_opaque = RustAutoOpaqueNom,
3838
);
3939
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0";
40-
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 342652895;
40+
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1150231082;
4141

4242
// Section: executor
4343

@@ -750,13 +750,13 @@ fn wire__crate__api__chain_swap__chain_swap_to_json_impl(
750750
},
751751
)
752752
}
753-
fn wire__crate__api__error__boltz_error_message_impl(
753+
fn wire__crate__api__error__boltz_error_detail_impl(
754754
port_: flutter_rust_bridge::for_generated::MessagePort,
755755
that: impl CstDecode<crate::api::error::BoltzError>,
756756
) {
757757
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
758758
flutter_rust_bridge::for_generated::TaskInfo {
759-
debug_name: "boltz_error_message",
759+
debug_name: "boltz_error_detail",
760760
port: Some(port_),
761761
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
762762
},
@@ -765,7 +765,7 @@ fn wire__crate__api__error__boltz_error_message_impl(
765765
move |context| {
766766
transform_result_dco::<_, _, ()>((move || {
767767
let output_ok = Result::<_, ()>::Ok({
768-
crate::api::error::BoltzError::message(&api_that);
768+
crate::api::error::BoltzError::detail(&api_that);
769769
})?;
770770
Ok(output_ok)
771771
})())

0 commit comments

Comments
 (0)