to_default 0.1.2

This library provides a convenient way to replace a typical usuage of `mem::replace`
Documentation
1
2
3
4
5
6
7
8
extern crate to_default;

fn main() {
	use to_default::*;
	let mut val = vec![ 1, 2 ];
	assert_eq!(val.to_default(), &[1, 2]);
	assert_eq!(val, Vec::new())
}