Просмотр исходного кода

Fix for rust commit 3dcd2157403163789aaf21a9ab3c4d30a7c6494d 'Switch to purely namespaced enums'

Jason Ozias 12 лет назад
Родитель
Сommit
0e55c64847
3 измененных файлов с 13 добавлено и 1 удалено
  1. 2 0
      src/host.rs
  2. 2 0
      src/lib.rs
  3. 9 1
      src/parser.rs

+ 2 - 0
src/host.rs

@@ -6,6 +6,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+pub use Host::{Domain,Ipv6};
+
 use std::ascii::OwnedAsciiExt;
 use std::cmp;
 use std::fmt::{Formatter, FormatError, Show};

+ 2 - 0
src/lib.rs

@@ -128,6 +128,8 @@ use std::path;
 
 use encoding::EncodingRef;
 
+pub use SchemeData::{RelativeSchemeData,NonRelativeSchemeData};
+pub use SchemeType::{NonRelativeScheme,RelativeScheme,FileLikeRelativeScheme};
 pub use host::{Host, Domain, Ipv6, Ipv6Address};
 pub use parser::{
     ErrorHandler, ParseResult, ParseError,

+ 9 - 1
src/parser.rs

@@ -5,8 +5,16 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
+pub use ParseError::{
+    EmptyHost,InvalidScheme,InvalidPort,InvalidIpv6Address,InvalidDomainCharacter,
+    InvalidCharacter,InvalidBackslash,InvalidPercentEncoded,InvalidAtSymbolInUser,
+    ExpectedTwoSlashes,ExpectedInitialSlash,NonUrlCodePoint,RelativeUrlWithScheme,
+    RelativeUrlWithoutBase,RelativeUrlWithNonRelativeBase,
+    NonAsciiDomainsNotSupportedYet,CannotSetFileScheme,
+    CannotSetJavascriptScheme,CannotSetNonRelativeScheme
+};
 
-
+pub use self::Context::{SetterContext,UrlParserContext};
 use std::ascii::AsciiExt;
 use std::fmt::{Formatter, FormatError, Show};
 use std::str::CharRange;