File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 99#![ feature( macro_rules) ]
1010
1111#![ warn( missing_doc) ]
12- #![ allow( uppercase_variables) ]
12+ #![ allow( uppercase_variables, non_snake_case_functions ) ]
1313
1414extern crate libc;
1515
@@ -1631,20 +1631,20 @@ impl<'l> RawState<'l> {
16311631
16321632 pub unsafe fn describe_ ( & mut self , idx : i32 , usestack : bool ) -> String {
16331633 match self . type_ ( idx) {
1634- None => "" . to_owned ( ) ,
1634+ None => "" . to_string ( ) ,
16351635 Some ( typ) => match typ {
1636- Type :: Nil => "nil" . to_owned ( ) ,
1637- Type :: Boolean => if self . toboolean ( idx) { "true" . to_owned ( ) }
1638- else { "false" . to_owned ( ) } ,
1636+ Type :: Nil => "nil" . to_string ( ) ,
1637+ Type :: Boolean => if self . toboolean ( idx) { "true" . to_string ( ) }
1638+ else { "false" . to_string ( ) } ,
16391639 Type :: Number => {
16401640 // Let Lua create the string instead of us
16411641 if usestack { self . pushvalue ( idx) ; } // copy the value
1642- let s = self . tostring ( -1 ) . map ( |s| s. to_owned ( ) ) ;
1642+ let s = self . tostring ( -1 ) . map ( |s| s. to_string ( ) ) ;
16431643 if usestack { self . pop ( 1 ) ; } // remove the copied value
16441644 s. unwrap_or_default ( ) // default will be ~""
16451645 }
16461646 Type :: String => {
1647- self . tostring ( idx) . unwrap_or ( "<invalid utf8>" ) . to_owned ( )
1647+ self . tostring ( idx) . unwrap_or ( "<invalid utf8>" ) . to_string ( )
16481648 }
16491649 Type :: LightUserdata |
16501650 Type :: Userdata |
You can’t perform that action at this time.
0 commit comments