Searched refs:from_file_path (Results 1 – 2 of 2) sorted by relevance
79 let url = Url::from_file_path(Path::new($path)).unwrap();89 assert_eq!(Url::from_file_path(Path::new("relative")), Err(())); in new_file_paths()90 assert_eq!(Url::from_file_path(Path::new("../relative")), Err(())); in new_file_paths()93 assert_eq!(Url::from_file_path(Path::new("relative")), Err(())); in new_file_paths()94 assert_eq!(Url::from_file_path(Path::new(r"..\relative")), Err(())); in new_file_paths()95 assert_eq!(Url::from_file_path(Path::new(r"\drive-relative")), Err(())); in new_file_paths()96 assert_eq!(Url::from_file_path(Path::new(r"\\ucn\")), Err(())); in new_file_paths()112 let url = Url::from_file_path(Path::new(OsStr::from_bytes(b"/foo/ba\x80r"))).unwrap(); in new_path_bad_utf8()131 assert!(Url::from_file_path(path).is_ok()); in new_path_windows_fun()398 let mut url = Url::from_file_path("/").expect("Failed to parse path"); in issue_197()[all …]
2322 pub fn from_file_path<P: AsRef<Path>>(path: P) -> Result<Url, ()> { in from_file_path() method2360 let mut url = Url::from_file_path(path)?; in from_directory_path()