mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use Result instead of panicking when the resource dir can't be found
This commit is contained in:
parent
20b1764d71
commit
ceb85795b1
11 changed files with 81 additions and 64 deletions
|
@ -157,7 +157,7 @@ fn test_fetch_data() {
|
|||
|
||||
#[test]
|
||||
fn test_fetch_file() {
|
||||
let mut path = resources_dir_path();
|
||||
let mut path = resources_dir_path().expect("Cannot find resource dir");
|
||||
path.push("servo.css");
|
||||
|
||||
let url = Url::from_file_path(path.clone()).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue