Add util::ignore

This commit is contained in:
Ben Blum 2012-08-07 14:16:51 -04:00
parent efea6f016e
commit 0cc6cefaec

View File

@ -5,6 +5,9 @@
/// The identity function.
pure fn id<T>(+x: T) -> T { x }
/// Ignores a value.
pure fn ignore<T>(+_x: T) { }
/**
* Swap the values at two mutable locations of the same type, without
* deinitialising or copying either one.