Skip to content

Commit be46e26

Browse files
committed
Squelch warnings
Update .to_owned() to .to_string() Turn off the non_snake_case_functions lint.
1 parent 68f8930 commit be46e26

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#![feature(macro_rules)]
1010

1111
#![warn(missing_doc)]
12-
#![allow(uppercase_variables)]
12+
#![allow(uppercase_variables,non_snake_case_functions)]
1313

1414
extern 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 |

0 commit comments

Comments
 (0)