@@ -1717,38 +1717,6 @@ fn generate_node(gen: &GeneratorContext,
17171717 Line ( "}" . to_string( ) ) ] ) ) ) ,
17181718 Line ( "}" . to_string( ) ) ] ) ) ;
17191719
1720- // TODO(versionbump): Remove this, as it has been superseded by capnp_rpc::new_client().
1721- mod_interior. push (
1722- Branch ( vec ! (
1723- ( if is_generic {
1724- Branch ( vec!(
1725- Line ( format!( "pub struct ToClient<_U,{}> {} {{" , params. params, params. where_clause) ) ,
1726- Indent ( Box :: new( Branch ( vec!(
1727- Line ( "pub u: _U," . to_string( ) ) ,
1728- Line ( params. phantom_data_type. clone( ) ) ,
1729- ) ) ) ) ,
1730- Line ( "}" . to_string( ) ) ,
1731- Line ( format!( "impl <{0}, _U: Server<{0}> + 'static> ToClient<_U,{0}> {1} {{" ,
1732- params. params, params. where_clause_with_static) ) ,
1733- Indent ( Box :: new( Line ( format!(
1734- "pub fn new(u: _U) -> ToClient<_U, {}> {{ ToClient {{u, _phantom: ::std::marker::PhantomData}} }}" ,
1735- params. params) ) ) ) ,
1736- ) )
1737- } else {
1738- Branch ( vec!(
1739- Line ( "pub struct ToClient<_U>{pub u: _U}" . to_string( ) ) ,
1740- Line ( "impl <_U: Server + 'static> ToClient<_U> {" . to_string( ) ) ,
1741- Indent ( Box :: new( Line ( "pub fn new(u: _U) -> ToClient<_U> { ToClient {u} }" . to_string( ) ) ) ) ,
1742- ) )
1743- } ) ,
1744- Indent ( Box :: new( Branch ( vec!(
1745- Line ( format!( "pub fn into_client<_T: ::capnp::private::capability::ServerHook>(self) -> Client{} {{" , bracketed_params) ) ,
1746- Indent (
1747- Box :: new( Line ( format!( "Client {{ client: _T::new_client(::std::boxed::Box::new(ServerDispatch {{ server: ::std::boxed::Box::new(self.u), {} }})), {} }}" , params. phantom_data_value, params. phantom_data_value) ) ) ) ,
1748- Line ( "}" . to_string( ) ) ) ) ) ) ,
1749- Line ( "}" . to_string( ) ) ) ) ) ;
1750-
1751-
17521720 mod_interior. push (
17531721 Branch ( vec ! (
17541722 Line ( format!( "impl {0} ::capnp::traits::HasTypeId for Client{0} {{" ,
0 commit comments