@@ -345,7 +345,7 @@ pub fn getopts(args: &[~str], opts: &[Opt]) -> Result {
345345 }
346346 i += 1;
347347 }
348- return Ok(Matches {opts: opts. to_owned(),
348+ return Ok(Matches {opts: vec:: to_owned(opts ),
349349 vals: vals,
350350 free: free});
351351}
@@ -447,7 +447,7 @@ pub fn opt_default(mm: &Matches, nm: &str, def: &str) -> Option<~str> {
447447 let vals = opt_vals ( mm, nm) ;
448448 if vals. is_empty ( ) { return None :: < ~str > ; }
449449 return match vals[ 0 ] { Val ( ref s) => Some :: < ~str > ( copy * s) ,
450- _ => Some :: < ~str > ( def . to_owned ( ) ) }
450+ _ => Some :: < ~str > ( str :: to_owned ( def ) ) }
451451}
452452
453453#[ deriving( Eq ) ]
@@ -487,10 +487,10 @@ pub mod groups {
487487 desc : & str , hint : & str ) -> OptGroup {
488488 let len = short_name. len ( ) ;
489489 assert ! ( len == 1 || len == 0 ) ;
490- return OptGroup { short_name : short_name . to_owned ( ) ,
491- long_name : long_name . to_owned ( ) ,
492- hint : hint . to_owned ( ) ,
493- desc : desc . to_owned ( ) ,
490+ return OptGroup { short_name : str :: to_owned ( short_name ) ,
491+ long_name : str :: to_owned ( long_name ) ,
492+ hint : str :: to_owned ( hint ) ,
493+ desc : str :: to_owned ( desc ) ,
494494 hasarg : Yes ,
495495 occur : Req } ;
496496 }
@@ -500,10 +500,10 @@ pub mod groups {
500500 desc : & str , hint : & str ) -> OptGroup {
501501 let len = short_name. len ( ) ;
502502 assert ! ( len == 1 || len == 0 ) ;
503- return OptGroup { short_name : short_name . to_owned ( ) ,
504- long_name : long_name . to_owned ( ) ,
505- hint : hint . to_owned ( ) ,
506- desc : desc . to_owned ( ) ,
503+ return OptGroup { short_name : str :: to_owned ( short_name ) ,
504+ long_name : str :: to_owned ( long_name ) ,
505+ hint : str :: to_owned ( hint ) ,
506+ desc : str :: to_owned ( desc ) ,
507507 hasarg : Yes ,
508508 occur : Optional } ;
509509 }
@@ -513,10 +513,10 @@ pub mod groups {
513513 desc : & str ) -> OptGroup {
514514 let len = short_name. len ( ) ;
515515 assert ! ( len == 1 || len == 0 ) ;
516- return OptGroup { short_name : short_name . to_owned ( ) ,
517- long_name : long_name . to_owned ( ) ,
516+ return OptGroup { short_name : str :: to_owned ( short_name ) ,
517+ long_name : str :: to_owned ( long_name ) ,
518518 hint: ~"",
519- desc : desc . to_owned ( ) ,
519+ desc : str :: to_owned ( desc ) ,
520520 hasarg : No ,
521521 occur : Optional } ;
522522 }
@@ -526,10 +526,10 @@ pub mod groups {
526526 desc : & str , hint : & str ) -> OptGroup {
527527 let len = short_name. len ( ) ;
528528 assert ! ( len == 1 || len == 0 ) ;
529- return OptGroup { short_name : short_name . to_owned ( ) ,
530- long_name : long_name . to_owned ( ) ,
531- hint : hint . to_owned ( ) ,
532- desc : desc . to_owned ( ) ,
529+ return OptGroup { short_name : str :: to_owned ( short_name ) ,
530+ long_name : str :: to_owned ( long_name ) ,
531+ hint : str :: to_owned ( hint ) ,
532+ desc : str :: to_owned ( desc ) ,
533533 hasarg : Maybe ,
534534 occur : Optional } ;
535535 }
@@ -542,10 +542,10 @@ pub mod groups {
542542 desc : & str , hint : & str ) -> OptGroup {
543543 let len = short_name. len ( ) ;
544544 assert ! ( len == 1 || len == 0 ) ;
545- return OptGroup { short_name : short_name . to_owned ( ) ,
546- long_name : long_name . to_owned ( ) ,
547- hint : hint . to_owned ( ) ,
548- desc : desc . to_owned ( ) ,
545+ return OptGroup { short_name : str :: to_owned ( short_name ) ,
546+ long_name : str :: to_owned ( long_name ) ,
547+ hint : str :: to_owned ( hint ) ,
548+ desc : str :: to_owned ( desc ) ,
549549 hasarg : Yes ,
550550 occur : Multi } ;
551551 }
@@ -654,7 +654,7 @@ pub mod groups {
654654 row
655655 } ) ;
656656
657- return brief . to_owned ( ) +
657+ return str :: to_owned ( brief ) +
658658 "\n \n Options:\n " +
659659 rows. connect ( "\n " ) +
660660 "\n \n " ;
0 commit comments