@@ -1479,12 +1479,13 @@ pub(crate) mod api_orchestrator_integration_impls {
14791479 type Error = ParseMiriRequestError ;
14801480
14811481 fn try_from ( other : api:: MiriRequest ) -> std:: result:: Result < Self , Self :: Error > {
1482- let api:: MiriRequest { code, edition } = other;
1482+ let api:: MiriRequest { code, edition, aliasing_model } = other;
14831483
14841484 Ok ( MiriRequest {
14851485 channel : Channel :: Nightly , // TODO: use what user has submitted
14861486 crate_type : CrateType :: Binary , // TODO: use what user has submitted
14871487 edition : parse_edition ( & edition) ?,
1488+ aliasing_model : parse_aliasing_model ( & aliasing_model) ?,
14881489 code,
14891490 } )
14901491 }
@@ -1494,6 +1495,8 @@ pub(crate) mod api_orchestrator_integration_impls {
14941495 pub ( crate ) enum ParseMiriRequestError {
14951496 #[ snafu( transparent) ]
14961497 Edition { source : ParseEditionError } ,
1498+ #[ snafu( transparent) ]
1499+ AliasingMode { source : ParseAliasingModelError } ,
14971500 }
14981501
14991502 impl From < WithOutput < MiriResponse > > for api:: MiriResponse {
@@ -1709,12 +1712,26 @@ pub(crate) mod api_orchestrator_integration_impls {
17091712 } )
17101713 }
17111714
1715+ pub ( crate ) fn parse_aliasing_model ( s : & str ) -> Result < AliasingModel , ParseAliasingModelError > {
1716+ Ok ( match s {
1717+ "stacked" => AliasingModel :: Stacked ,
1718+ "tree" => AliasingModel :: Tree ,
1719+ value => return ParseAliasingModelSnafu { value } . fail ( ) ,
1720+ } )
1721+ }
1722+
17121723 #[ derive( Debug , Snafu ) ]
17131724 #[ snafu( display( "'{value}' is not a valid edition" ) ) ]
17141725 pub ( crate ) struct ParseEditionError {
17151726 value : String ,
17161727 }
17171728
1729+ #[ derive( Debug , Snafu ) ]
1730+ #[ snafu( display( "'{value}' is not a valid aliasing model" ) ) ]
1731+ pub ( crate ) struct ParseAliasingModelError {
1732+ value : String ,
1733+ }
1734+
17181735 impl From < gist:: Gist > for api:: MetaGistResponse {
17191736 fn from ( me : gist:: Gist ) -> Self {
17201737 api:: MetaGistResponse {
0 commit comments