Add util::ignore
This commit is contained in:
parent
efea6f016e
commit
0cc6cefaec
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue