about summary refs log tree commit diff
path: root/src/libcore/dvec.rs
diff options
context:
space:
mode:
authorChris Peterson <cpeterson@mozilla.com>2012-12-23 14:37:44 -0800
committerChris Peterson <cpeterson@mozilla.com>2012-12-23 14:37:44 -0800
commit6d8621ae7f0df0bc3878c256b98a6483fc3d9a32 (patch)
tree15851f772a6ca099c4a19ee9d7875a7535412863 /src/libcore/dvec.rs
parent50bb8383894804911f6d59b025c7e94724d7eef0 (diff)
downloadrust-6d8621ae7f0df0bc3878c256b98a6483fc3d9a32.tar.gz
rust-6d8621ae7f0df0bc3878c256b98a6483fc3d9a32.zip
core: Mark some functions as pure
Diffstat (limited to 'src/libcore/dvec.rs')
-rw-r--r--src/libcore/dvec.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/dvec.rs b/src/libcore/dvec.rs
index b02a6f5c8b5..236d6bce9f0 100644
--- a/src/libcore/dvec.rs
+++ b/src/libcore/dvec.rs
@@ -67,17 +67,17 @@ pub pure fn DVec<A>() -> DVec<A> {
 }
 
 /// Creates a new dvec with a single element
-pub fn from_elem<A>(e: A) -> DVec<A> {
+pub pure fn from_elem<A>(e: A) -> DVec<A> {
     DVec {mut data: ~[move e]}
 }
 
 /// Creates a new dvec with the contents of a vector
-pub fn from_vec<A>(v: ~[A]) -> DVec<A> {
+pub pure fn from_vec<A>(v: ~[A]) -> DVec<A> {
     DVec {mut data: move v}
 }
 
 /// Consumes the vector and returns its contents
-pub fn unwrap<A>(d: DVec<A>) -> ~[A] {
+pub pure fn unwrap<A>(d: DVec<A>) -> ~[A] {
     let DVec {data: v} = move d;
     move v
 }