From 0cc6cefaec4cedfc91ec7de447e116e6eba82915 Mon Sep 17 00:00:00 2001 From: Ben Blum Date: Tue, 7 Aug 2012 14:16:51 -0400 Subject: [PATCH] Add util::ignore --- src/libcore/util.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libcore/util.rs b/src/libcore/util.rs index 9b7a644b508..0f6c852ddcb 100644 --- a/src/libcore/util.rs +++ b/src/libcore/util.rs @@ -5,6 +5,9 @@ /// The identity function. pure fn id(+x: T) -> T { x } +/// Ignores a value. +pure fn ignore(+_x: T) { } + /** * Swap the values at two mutable locations of the same type, without * deinitialising or copying either one.