Commit 3d78fcb 1 parent c535724 commit 3d78fcb Copy full SHA for 3d78fcb
File tree 2 files changed +5
-8
lines changed
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -206,10 +206,6 @@ impl fmt::Display for Error {
206
206
write ! ( f, " for url ({url})" ) ?;
207
207
}
208
208
209
- if let Some ( e) = & self . inner . source {
210
- write ! ( f, ": {e}" ) ?;
211
- }
212
-
213
209
Ok ( ( ) )
214
210
}
215
211
}
Original file line number Diff line number Diff line change @@ -84,22 +84,23 @@ if_hyper! {
84
84
#[ cfg( test) ]
85
85
mod tests {
86
86
use super :: * ;
87
+ use std:: error:: Error ;
87
88
88
89
#[ test]
89
90
fn into_url_file_scheme ( ) {
90
91
let err = "file:///etc/hosts" . into_url ( ) . unwrap_err ( ) ;
91
92
assert_eq ! (
92
- err. to_string( ) ,
93
- "builder error for url (file:///etc/hosts): URL scheme is not allowed"
93
+ err. source ( ) . unwrap ( ) . to_string( ) ,
94
+ "URL scheme is not allowed"
94
95
) ;
95
96
}
96
97
97
98
#[ test]
98
99
fn into_url_blob_scheme ( ) {
99
100
let err = "blob:https://example.com" . into_url ( ) . unwrap_err ( ) ;
100
101
assert_eq ! (
101
- err. to_string( ) ,
102
- "builder error for url (blob:https://example.com): URL scheme is not allowed"
102
+ err. source ( ) . unwrap ( ) . to_string( ) ,
103
+ "URL scheme is not allowed"
103
104
) ;
104
105
}
105
106
You can’t perform that action at this time.
0 commit comments