1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![warn(dead_code)]
mod expr;
pub mod models;
mod parsers;

#[cfg(test)]
mod tests {
  use crate::models::uri::Uri;
  use http::Uri as HttpUri;

  #[test]
  fn compare_uri_parsing() {
    let text = "http://localhost";
    let http_uri = text.parse::<HttpUri>().unwrap();
    println!("{:?}", http_uri.host());

    let oni_comb_uri = Uri::parse(text).unwrap();
    println!("{:?}", oni_comb_uri.authority().unwrap().host_name());
  }
}