Skip to content

Commit

Permalink
refactor: Remove comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmah309 committed Apr 22, 2024
1 parent be19672 commit d3cf77c
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions impl/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,6 @@ pub(crate) fn expand(error_enums: Vec<ErrorEnum>) -> TokenStream {
}
}

// token_stream.append_all(quote::quote! {
// macro_rules! match_coerce {

// // Special case: When the last pattern is 'BookParsingError => BookSectionParsingError', inject specific match arms.
// ($expr:expr, { $($patterns:pat => $results:expr),+ ; BookParsingError => BookSectionParsingError }) => {
// match $expr {
// // Process all patterns before the last one normally.
// $($patterns => $results,)+

// // Inject specific match arms for the special case.
// Err(BookParsingError::MissingNameArg) => { return Err(BookSectionParsingError::MissingNameArg); },
// Err(BookParsingError::NoContents) => { return Err(BookSectionParsingError::NoContents); },
// }
// };

// // General case: Handle all cases normally, without special additions.
// // ($expr:expr, { $($patterns:pat => $results:expr),+ ; $last_pattern:pat => $last_result:expr }) => {
// // match $expr {
// // $($patterns => $results,)+
// // $last_pattern => $last_result,
// // }
// // };
// }

// pub(crate) use match_coerce;
// });
for error_enum_node in error_enum_nodes.iter() {
add_code_for_node(&*(**error_enum_node).borrow(), &mut token_stream);
}
Expand Down

0 comments on commit d3cf77c

Please sign in to comment.