Guest User

Untitled

a guest
Jul 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. struct A {
  2. }
  3.  
  4. struct B {
  5. }
  6.  
  7. impl From<A> for B {
  8. fn from(a: A) -> Self {
  9. B { }
  10. }
  11. }
  12.  
  13. struct C<Inner> {
  14. inner: Inner,
  15. }
  16.  
  17. impl From<C<A>> for C<B> {
  18. fn from(c: C<A>) -> Self {
  19. C { inner: c.inner.into() }
  20. }
  21. }
  22.  
  23. fn main () {}
Add Comment
Please, Sign In to add comment