We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1b4c3a commit 59f2ad3Copy full SHA for 59f2ad3
capnpc/src/codegen.rs
@@ -1937,8 +1937,7 @@ fn generate_node(
1937
))),
1938
Indent(Box::new(Branch(vec![
1939
Line(
1940
- "fn try_from(value: u16) -> ::core::result::Result<Self, Self::Error> {"
1941
- .to_string(),
+ format!("fn try_from(value: u16) -> ::core::result::Result<Self, <{last_name} as ::core::convert::TryFrom<u16>>::Error> {{")
1942
),
1943
1944
Line("match value {".to_string()),
capnpc/test/test.capnp
@@ -106,6 +106,12 @@ enum TestEnum {
106
garply @7;
107
}
108
109
+enum TestEnumWithTrickyNames {
110
+ foo @0;
111
+ bar @1;
112
+ error @2;
113
+}
114
+
115
struct TestAllTypes {
116
voidField @0 : Void;
117
boolField @1 : Bool;
0 commit comments