1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#![warn(missing_docs)]
#[cfg(feature = "serde")]
#[macro_use]
extern crate serde;
extern crate opaque_typedef;
#[macro_use]
extern crate opaque_typedef_macros;
extern crate url;
pub use url::ParseError as UrlParseError;
pub use url::Url;
pub use absolute::{AbsoluteIri, AbsoluteIriStr, AbsoluteIriString};
pub use relative::{RelativeIriParseError, RelativeIriStr, RelativeIriString};
pub mod absolute;
pub mod relative;
fn has_colon_before_slash(s: &str) -> bool {
s.find(|c| c == ':' || c == '/')
.map_or(false, |pos| s.as_bytes()[pos] == b':')
}