File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -353,21 +353,21 @@ impl Loop {
353
353
pub struct UvError ( c_int ) ;
354
354
355
355
impl UvError {
356
- pub fn name ( & self ) -> ~ str {
356
+ pub fn name ( & self ) -> StrBuf {
357
357
unsafe {
358
358
let inner = match self { & UvError ( a) => a } ;
359
359
let name_str = uvll:: uv_err_name ( inner) ;
360
360
assert ! ( name_str. is_not_null( ) ) ;
361
- from_c_str ( name_str)
361
+ from_c_str ( name_str) . to_strbuf ( )
362
362
}
363
363
}
364
364
365
- pub fn desc ( & self ) -> ~ str {
365
+ pub fn desc ( & self ) -> StrBuf {
366
366
unsafe {
367
367
let inner = match self { & UvError ( a) => a } ;
368
368
let desc_str = uvll:: uv_strerror ( inner) ;
369
369
assert ! ( desc_str. is_not_null( ) ) ;
370
- from_c_str ( desc_str)
370
+ from_c_str ( desc_str) . to_strbuf ( )
371
371
}
372
372
}
373
373
Original file line number Diff line number Diff line change @@ -851,15 +851,15 @@ mod test {
851
851
fn connect_close_ip4 ( ) {
852
852
match TcpWatcher :: connect ( local_loop ( ) , next_test_ip4 ( ) , None ) {
853
853
Ok ( ..) => fail ! ( ) ,
854
- Err ( e) => assert_eq ! ( e. name( ) , "ECONNREFUSED" . to_owned ( ) ) ,
854
+ Err ( e) => assert_eq ! ( e. name( ) , "ECONNREFUSED" . to_strbuf ( ) ) ,
855
855
}
856
856
}
857
857
858
858
#[ test]
859
859
fn connect_close_ip6 ( ) {
860
860
match TcpWatcher :: connect ( local_loop ( ) , next_test_ip6 ( ) , None ) {
861
861
Ok ( ..) => fail ! ( ) ,
862
- Err ( e) => assert_eq ! ( e. name( ) , "ECONNREFUSED" . to_owned ( ) ) ,
862
+ Err ( e) => assert_eq ! ( e. name( ) , "ECONNREFUSED" . to_strbuf ( ) ) ,
863
863
}
864
864
}
865
865
Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ mod tests {
338
338
fn bind_err ( ) {
339
339
match PipeListener :: bind ( local_loop ( ) , & "path/to/nowhere" . to_c_str ( ) ) {
340
340
Ok ( ..) => fail ! ( ) ,
341
- Err ( e) => assert_eq ! ( e. name( ) , "EACCES" . to_owned ( ) ) ,
341
+ Err ( e) => assert_eq ! ( e. name( ) , "EACCES" . to_strbuf ( ) ) ,
342
342
}
343
343
}
344
344
You can’t perform that action at this time.
0 commit comments