-
Notifications
You must be signed in to change notification settings - Fork 546
Closed as not planned
Labels
track meta/exercise crateIssues dealing with the exercise crateIssues dealing with the exercise crate
Description
First special rule: we need special handling for structured canonical data: in the case of the input map, it should not represent it as a hashmap, but unpack it into the input tuple sent to process_X_case.
That is, using abbreviate as an example, the generated code should not be:
process_abbreviate_case(
{
let mut hm = ::std::collections::HashMap::new();
hm.insert("phrase", "GNU Image Manipulation Program");
hm
},
"GIMP",
);but instead:
process_abbreviate_case(
("GNU Image Manipulation Program",),
"GIMP",
);Second special rule: when the tuple sent to input contains exactly one item, it doesn't need to be a tuple, but can be a bare item. This means that the same generated code for abbreviate would actually be:
process_abbreviate_case(
"GNU Image Manipulation Program",
"GIMP",
);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
track meta/exercise crateIssues dealing with the exercise crateIssues dealing with the exercise crate