Skip to content

Commit e115edf

Browse files
authored
Merge pull request fzyzcjy#2670 from fzyzcjy/feat/2652
Enable BoxedWireDartCodecCstGenerator branch
2 parents 35d38cf + 577d6d4 commit e115edf

File tree

1 file changed

+10
-14
lines changed
  • frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/cst/encoder/ty

1 file changed

+10
-14
lines changed

frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/cst/encoder/ty/boxed.rs

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ use crate::codegen::generator::misc::target::Target;
44
use crate::codegen::generator::wire::dart::spec_generator::codec::cst::base::*;
55
use crate::codegen::generator::wire::dart::spec_generator::codec::cst::encoder::ty::primitive::dart_native_type_of_primitive;
66
use crate::codegen::generator::wire::dart::spec_generator::codec::cst::encoder::ty::WireDartCodecCstGeneratorEncoderTrait;
7+
use crate::codegen::generator::wire::rust::spec_generator::codec::cst::base::WireRustCodecCstGenerator;
78
use crate::codegen::ir::mir::ty::delegate::MirTypeDelegate;
89
use crate::codegen::ir::mir::ty::MirType::StructRef;
910
use crate::codegen::ir::mir::ty::{MirType, MirTypeTrait};
11+
use crate::library::codegen::generator::wire::rust::spec_generator::codec::cst::decoder::ty::WireRustCodecCstGeneratorDecoderTrait;
1012

1113
impl WireDartCodecCstGeneratorEncoderTrait for BoxedWireDartCodecCstGenerator<'_> {
1214
fn generate_encode_func_body(&self) -> Acc<Option<String>> {
@@ -81,20 +83,14 @@ impl WireDartCodecCstGeneratorEncoderTrait for BoxedWireDartCodecCstGenerator<'_
8183
WireDartCodecCstGenerator::new(self.mir.inner.clone(), self.context)
8284
.dart_wire_type(target)
8385
} else {
84-
// Quick hack to remove seemingly dead code without causing any trouble ;)
85-
86-
// frb-coverage:ignore-start
87-
unreachable!("Codecov says this branch is never used. If you see this message, please create an issue and let's re-enable the logic here.")
88-
// frb-coverage:ignore-end
89-
90-
// format!(
91-
// "int /* *{} */",
92-
// WireRustCodecCstGenerator::new(
93-
// self.mir.inner.clone(),
94-
// self.context.as_wire_rust_context()
95-
// )
96-
// .rust_wire_type(target)
97-
// )
86+
format!(
87+
"int /* *{} */",
88+
WireRustCodecCstGenerator::new(
89+
self.mir.inner.clone(),
90+
self.context.as_wire_rust_context()
91+
)
92+
.rust_wire_type(target)
93+
)
9894
}
9995
}
10096
Target::Io => {

0 commit comments

Comments
 (0)