@@ -19,6 +19,7 @@ use libc;
19
19
use option:: { None , Option , Some } ;
20
20
use str;
21
21
use to_str:: ToStr ;
22
+ use ascii:: { AsciiCast , AsciiStr } ;
22
23
23
24
#[ deriving( Clone , Eq ) ]
24
25
pub struct WindowsPath {
@@ -753,8 +754,8 @@ impl GenericPath for WindowsPath {
753
754
fn is_restricted ( & self ) -> bool {
754
755
match self . filestem ( ) {
755
756
Some ( stem) => {
756
- // FIXME: 4318 Instead of to_str_ascii, could use
757
- // to_str_consume to not do a unneccessary copy.
757
+ // FIXME: # 4318 Instead of to_ascii and to_str_ascii, could use
758
+ // to_ascii_consume and to_str_consume to not do a unnecessary copy.
758
759
match stem. to_ascii ( ) . to_lower ( ) . to_str_ascii ( ) {
759
760
~"con" | ~"aux" | ~"com1" | ~"com2" | ~"com3" | ~"com4" |
760
761
~"lpt1" | ~"lpt2" | ~"lpt3" | ~"prn" | ~"nul" => true ,
@@ -812,8 +813,8 @@ impl GenericPath for WindowsPath {
812
813
device : match self . device {
813
814
None => None ,
814
815
815
- // FIXME: 4318 Instead of to_str_ascii, could use
816
- // to_str_consume to not do a unneccessary copy.
816
+ // FIXME: # 4318 Instead of to_ascii and to_str_ascii, could use
817
+ // to_ascii_consume and to_str_consume to not do a unnecessary copy.
817
818
Some ( ref device) => Some ( device. to_ascii ( ) . to_upper ( ) . to_str_ascii ( ) )
818
819
} ,
819
820
is_absolute : self . is_absolute ,
0 commit comments