about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--mk/crates.mk3
-rw-r--r--src/doc/index.md1
-rw-r--r--src/libextra/lib.rs2
-rw-r--r--src/libuuid/lib.rs (renamed from src/libextra/uuid.rs)26
4 files changed, 21 insertions, 11 deletions
diff --git a/mk/crates.mk b/mk/crates.mk
index f3d71da9eaa..e02e4fb8706 100644
--- a/mk/crates.mk
+++ b/mk/crates.mk
@@ -49,7 +49,7 @@
 # automatically generated for all stage/host/target combinations.
 ################################################################################
 
-TARGET_CRATES := std extra green rustuv native flate arena glob term semver
+TARGET_CRATES := std extra green rustuv native flate arena glob term semver uuid
 HOST_CRATES := syntax rustc rustdoc
 CRATES := $(TARGET_CRATES) $(HOST_CRATES)
 TOOLS := compiletest rustdoc rustc
@@ -67,6 +67,7 @@ DEPS_arena := std extra
 DEPS_glob := std
 DEPS_term := std
 DEPS_semver := std
+DEPS_uuid := std extra
 
 TOOL_DEPS_compiletest := extra green rustuv
 TOOL_DEPS_rustdoc := rustdoc green rustuv
diff --git a/src/doc/index.md b/src/doc/index.md
index a639ca16f35..9915d67bfca 100644
--- a/src/doc/index.md
+++ b/src/doc/index.md
@@ -42,6 +42,7 @@ li {list-style-type: none; }
 * [The `glob` file path matching library](glob/index.html)
 * [The `semver` version collation library](semver/index.html)
 * [The `term` terminal-handling library](term/index.html)
+* [The UUID library](uuid/index.html)
 
 # Tooling
 
diff --git a/src/libextra/lib.rs b/src/libextra/lib.rs
index 2c417026065..96413f82729 100644
--- a/src/libextra/lib.rs
+++ b/src/libextra/lib.rs
@@ -84,8 +84,6 @@ pub mod rational;
 pub mod complex;
 pub mod stats;
 pub mod hex;
-pub mod uuid;
-
 
 #[cfg(unicode)]
 mod unicode;
diff --git a/src/libextra/uuid.rs b/src/libuuid/lib.rs
index 29d3066b2f5..60e69af324e 100644
--- a/src/libextra/uuid.rs
+++ b/src/libuuid/lib.rs
@@ -29,8 +29,7 @@ unlikely.
 To create a new random (V4) UUID and print it out in hexadecimal form:
 
 ```rust
-extern mod extra;
-use extra::uuid::Uuid;
+use uuid::Uuid;
 
 fn main() {
     let uuid1 = Uuid::new_v4();
@@ -55,6 +54,13 @@ Examples of string representations:
 
 */
 
+#[crate_id = "uuid#0.10-pre"];
+#[crate_type = "rlib"];
+#[crate_type = "dylib"];
+#[license = "MIT/ASL2"];
+
+extern mod extra;
+
 use std::str;
 use std::vec;
 use std::num::FromStrRadix;
@@ -67,7 +73,7 @@ use std::cmp::Eq;
 use std::cast::{transmute,transmute_copy};
 use std::to_bytes::{IterBytes, Cb};
 
-use serialize::{Encoder, Encodable, Decoder, Decodable};
+use extra::serialize::{Encoder, Encodable, Decoder, Decodable};
 
 /// A 128-bit (16 byte) buffer containing the ID
 pub type UuidBytes = [u8, ..16];
@@ -510,7 +516,9 @@ impl rand::Rand for Uuid {
 
 #[cfg(test)]
 mod test {
-    use super::*;
+    use super::{Uuid, VariantMicrosoft, VariantNCS, VariantRFC4122,
+                Version1Mac, Version2Dce, Version3Md5, Version4Random,
+                Version5Sha1};
     use std::str;
     use std::rand;
     use std::io::MemWriter;
@@ -575,6 +583,8 @@ mod test {
 
     #[test]
     fn test_parse_uuid_v4() {
+        use super::{ErrorInvalidCharacter, ErrorInvalidGroups,
+                    ErrorInvalidGroupLength, ErrorInvalidLength};
 
         // Invalid
         assert!(Uuid::parse_string("").is_err());
@@ -774,8 +784,8 @@ mod test {
 
     #[test]
     fn test_serialize_round_trip() {
-        use ebml;
-        use serialize::{Encodable, Decodable};
+        use extra::ebml;
+        use extra::serialize::{Encodable, Decodable};
 
         let u = Uuid::new_v4();
         let mut wr = MemWriter::new();
@@ -799,8 +809,8 @@ mod test {
 
 #[cfg(test)]
 mod bench {
-    use super::*;
-    use test::BenchHarness;
+    use super::Uuid;
+    use extra::test::BenchHarness;
 
     #[bench]
     pub fn create_uuids(bh: &mut BenchHarness) {