Skip to content

Commit f3b4fec

Browse files
committed
Added self imports which are now necessary for enums (see rust-lang/rust#18973)
1 parent c66943b commit f3b4fec

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

src/lib.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ use std::slice;
8282

8383
use serialize::{Encoder, Encodable, Decoder, Decodable};
8484

85+
use self::ParseError::{ErrorInvalidCharacter, ErrorInvalidGroups,
86+
ErrorInvalidLength, ErrorInvalidGroupLength};
87+
use self::UuidVariant::{VariantFuture, VariantMicrosoft,
88+
VariantNCS, VariantRFC4122};
89+
use self::UuidVersion::{Version1Mac, Version2Dce, Version3Md5,
90+
Version4Random, Version5Sha1};
91+
8592
/// A 128-bit (16 byte) buffer containing the ID
8693
pub type UuidBytes = [u8, ..16];
8794

@@ -516,9 +523,11 @@ impl rand::Rand for Uuid {
516523

517524
#[cfg(test)]
518525
mod tests {
519-
use super::{Uuid, VariantMicrosoft, VariantNCS, VariantRFC4122,
520-
Version1Mac, Version2Dce, Version3Md5, Version4Random,
521-
Version5Sha1};
526+
use super::Uuid;
527+
use super::UuidVariant::{VariantMicrosoft,
528+
VariantNCS, VariantRFC4122};
529+
use super::UuidVersion::{Version1Mac, Version2Dce, Version3Md5,
530+
Version4Random, Version5Sha1};
522531
use std::rand;
523532

524533
#[test]
@@ -581,8 +590,10 @@ mod tests {
581590

582591
#[test]
583592
fn test_parse_uuid_v4() {
584-
use super::{ErrorInvalidCharacter, ErrorInvalidGroups,
585-
ErrorInvalidGroupLength, ErrorInvalidLength};
593+
use super::ParseError::{ErrorInvalidCharacter,
594+
ErrorInvalidGroups,
595+
ErrorInvalidLength,
596+
ErrorInvalidGroupLength};
586597

587598
// Invalid
588599
assert!(Uuid::parse_str("").is_err());

0 commit comments

Comments
 (0)