Advertisement
tomdodd4598

Untitled

Jun 6th, 2021
1,416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.24 KB | None | 0 0
  1. use std::cell::RefCell;
  2. use std::rc::Rc;
  3.  
  4. pub struct Item<T> {
  5.     pub value: T,
  6.     pub next: Option<Box<Item<T>>>
  7. }
  8.  
  9. impl<T> Item<T> where T: PartialEq {
  10.     pub fn new(val: T) -> Item<T> {
  11.         Item {
  12.             value: val,
  13.             next: None
  14.         }
  15.     }
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement