Add util::ignore
This commit is contained in:
parent
efea6f016e
commit
0cc6cefaec
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user