@@ -800,7 +800,7 @@ impl Printer<'_, '_> {
800800 self . print_idx ( & state. core . func_names , * idx) ?;
801801 self . end_group ( ) ?;
802802 }
803- CanonicalOption :: Async => self . result . write_str ( "async" ) ?,
803+ CanonicalOption :: Async => self . print_type_keyword ( "async" ) ?,
804804 CanonicalOption :: Callback ( idx) => {
805805 self . start_group ( "callback " ) ?;
806806 self . print_idx ( & state. core . func_names , * idx) ?;
@@ -928,10 +928,10 @@ impl Printer<'_, '_> {
928928 Ok ( ( ) )
929929 } ) ?;
930930 }
931- CanonicalFunction :: TaskYield { async_ } => {
932- self . print_intrinsic ( state, "canon task. yield" , & |me, _| {
931+ CanonicalFunction :: Yield { async_ } => {
932+ self . print_intrinsic ( state, "canon yield" , & |me, _| {
933933 if async_ {
934- me. result . write_str ( " async" ) ?;
934+ me. print_type_keyword ( " async" ) ?;
935935 }
936936 Ok ( ( ) )
937937 } ) ?;
@@ -960,7 +960,7 @@ impl Printer<'_, '_> {
960960 self . print_intrinsic ( state, "canon stream.cancel-read " , & |me, state| {
961961 me. print_idx ( & state. component . type_names , ty) ?;
962962 if async_ {
963- me. result . write_str ( " async" ) ?;
963+ me. print_type_keyword ( " async" ) ?;
964964 }
965965 Ok ( ( ) )
966966 } ) ?;
@@ -969,7 +969,7 @@ impl Printer<'_, '_> {
969969 self . print_intrinsic ( state, "canon stream.cancel-write " , & |me, state| {
970970 me. print_idx ( & state. component . type_names , ty) ?;
971971 if async_ {
972- me. result . write_str ( " async" ) ?;
972+ me. print_type_keyword ( " async" ) ?;
973973 }
974974 Ok ( ( ) )
975975 } ) ?;
@@ -1005,7 +1005,7 @@ impl Printer<'_, '_> {
10051005 self . print_intrinsic ( state, "canon future.cancel-read " , & |me, state| {
10061006 me. print_idx ( & state. component . type_names , ty) ?;
10071007 if async_ {
1008- me. result . write_str ( " async" ) ?;
1008+ me. print_type_keyword ( " async" ) ?;
10091009 }
10101010 Ok ( ( ) )
10111011 } ) ?;
@@ -1014,7 +1014,7 @@ impl Printer<'_, '_> {
10141014 self . print_intrinsic ( state, "canon future.cancel-write " , & |me, state| {
10151015 me. print_idx ( & state. component . type_names , ty) ?;
10161016 if async_ {
1017- me. result . write_str ( " async" ) ?;
1017+ me. print_type_keyword ( " async" ) ?;
10181018 }
10191019 Ok ( ( ) )
10201020 } ) ?;
0 commit comments