inscope 0.0.1

Track and modify the scope of a variable
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use inscope::Scope;


#[test]
fn no_special() {
  let x = Scope::new(5);
  assert_eq!(*x, Some(5));
}

#[test]
fn delete() {
  let x = Scope::new(5);
  assert_eq!(*x, Some(5));

  unsafe { x.delete() };
  assert_eq!(*x, None);
}