2 releases
0.1.1 | Apr 25, 2025 |
---|---|
0.1.0 | Apr 25, 2025 |
#201 in No standard library
226 downloads per month
8KB
207 lines
Like C++ std::move
use &mut impl StdMove
Examples
Move resource types
use std_move::r#move;
let mut a = vec![1, 2, 3];
let b;
b = r#move!(a);
assert_eq!(a, []);
assert_eq!(b, [1, 2, 3]);
Trivial types
use std_move::r#move;
let mut n = 3;
assert_eq!(r#move!(n), 3);
assert_eq!(r#move!(n), 3);
assert_eq!(n, 3);