Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::cell::Cell;
- use std::boxed::Box;
- fn main()
- {
- let mut node = Node::new();
- println!("{:?}", Node::FRAG);
- }
- #[derive(Debug)]
- struct Node{
- node: Option<Box<Node>>
- }
- impl Node{
- const mut FRAG: bool = false;
- fn new() -> Self{
- Self{
- node: Some(Box::new(Self{node: None}))
- }
- }
- fn set_FRAG(b: bool) -> bool{
- Self::FRAG = b;
- b
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement