summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorBen Blum <bblum@andrew.cmu.edu>2013-06-10 20:30:01 -0400
committerBen Blum <bblum@andrew.cmu.edu>2013-06-12 20:53:40 -0400
commit6b22c090a5492448e5ef2992745725199851f0fe (patch)
tree793ccc8f324808f50c0ef57ba286145651a24109 /src/libstd
parent84bed9769b5d15871481b657860ad6a7d0a62f42 (diff)
downloadrust-6b22c090a5492448e5ef2992745725199851f0fe.tar.gz
rust-6b22c090a5492448e5ef2992745725199851f0fe.zip
make util::NonCopyable a unit struct instead of a struct with a unit
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/util.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libstd/util.rs b/src/libstd/util.rs
index 376ead608bc..61c284f580c 100644
--- a/src/libstd/util.rs
+++ b/src/libstd/util.rs
@@ -75,13 +75,11 @@ pub fn replace<T>(dest: &mut T, mut src: T) -> T {
 }
 
 /// A non-copyable dummy type.
-pub struct NonCopyable {
-    priv i: (),
-}
+pub struct NonCopyable;
 
 impl NonCopyable {
     /// Creates a dummy non-copyable structure and returns it for use.
-    pub fn new() -> NonCopyable { NonCopyable { i: () } }
+    pub fn new() -> NonCopyable { NonCopyable }
 }
 
 impl Drop for NonCopyable {