#move #cpp

no-std std-move

Similar to cpp std::move, not very useful

2 releases

0.1.1 Apr 25, 2025
0.1.0 Apr 25, 2025

#201 in No standard library

Download history 226/week @ 2025-04-23

226 downloads per month

MIT license

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);

No runtime deps

Features