@@ -210,7 +210,7 @@ fn file_paths() {
210
210
211
211
let mut url = Url :: from_file_path ( & path:: posix:: Path :: new ( "/foo/bar" ) ) . unwrap ( ) ;
212
212
assert_eq ! ( url. host( ) , Some ( & Domain ( "" . to_string( ) ) ) ) ;
213
- assert_eq ! ( url. path( ) , Some ( & [ "foo" . to_string( ) , "bar" . to_string( ) ] ) ) ;
213
+ assert_eq ! ( url. path( ) , Some ( [ "foo" . to_string( ) , "bar" . to_string( ) ] . as_slice ( ) ) ) ;
214
214
assert ! ( url. to_file_path( ) == Ok ( path:: posix:: Path :: new( "/foo/bar" ) ) ) ;
215
215
216
216
* url. path_mut ( ) . unwrap ( ) . get_mut ( 1 ) = "ba\0 r" . to_string ( ) ;
@@ -226,7 +226,7 @@ fn file_paths() {
226
226
227
227
let mut url = Url :: from_file_path ( & path:: windows:: Path :: new ( r"C:\foo\bar" ) ) . unwrap ( ) ;
228
228
assert_eq ! ( url. host( ) , Some ( & Domain ( "" . to_string( ) ) ) ) ;
229
- assert_eq ! ( url. path( ) , Some ( & [ "C:" . to_string( ) , "foo" . to_string( ) , "bar" . to_string( ) ] ) ) ;
229
+ assert_eq ! ( url. path( ) , Some ( [ "C:" . to_string( ) , "foo" . to_string( ) , "bar" . to_string( ) ] . as_slice ( ) ) ) ;
230
230
assert ! ( url. to_file_path:: <path:: windows:: Path >( )
231
231
== Ok ( path:: windows:: Path :: new( r"C:\foo\bar" ) ) ) ;
232
232
@@ -253,10 +253,10 @@ fn directory_paths() {
253
253
254
254
let url = Url :: from_directory_path ( & path:: posix:: Path :: new ( "/foo/bar" ) ) . unwrap ( ) ;
255
255
assert_eq ! ( url. host( ) , Some ( & Domain ( "" . to_string( ) ) ) ) ;
256
- assert_eq ! ( url. path( ) , Some ( & [ "foo" . to_string( ) , "bar" . to_string( ) , "" . to_string( ) ] ) ) ;
256
+ assert_eq ! ( url. path( ) , Some ( [ "foo" . to_string( ) , "bar" . to_string( ) , "" . to_string( ) ] . as_slice ( ) ) ) ;
257
257
258
258
let url = Url :: from_directory_path ( & path:: windows:: Path :: new ( r"C:\foo\bar" ) ) . unwrap ( ) ;
259
259
assert_eq ! ( url. host( ) , Some ( & Domain ( "" . to_string( ) ) ) ) ;
260
- assert_eq ! ( url. path( ) , Some ( & [
261
- "C:" . to_string( ) , "foo" . to_string( ) , "bar" . to_string( ) , "" . to_string( ) ] ) ) ;
260
+ assert_eq ! ( url. path( ) , Some ( [
261
+ "C:" . to_string( ) , "foo" . to_string( ) , "bar" . to_string( ) , "" . to_string( ) ] . as_slice ( ) ) ) ;
262
262
}
0 commit comments