Skip to content

Commit d053638

Browse files
committed
Switch to rust stable.
1 parent 2015655 commit d053638

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

.rustfmt.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
indent_style="Block"
2-
imports_indent="Block"
31
use_try_shorthand=true
42
use_field_init_shorthand=true
5-
merge_imports=true

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
language: rust
2-
rust: nightly
32
before_script:
43
- rustup component add rustfmt-preview
54
script:

luacompiler/src/lib/bytecode/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ impl LuaBytecode {
8484

8585
impl fmt::Display for LuaBytecode {
8686
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
87-
write!(f, "{{\n");
87+
write!(f, "{{\n")?;
8888
for instr in &self.block {
89-
write!(f, " {}\n", instr);
89+
write!(f, " {}\n", instr)?;
9090
}
9191
write!(f, "}}")
9292
}

luacompiler/src/lib/irgen/register_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ mod tests {
177177
#[test]
178178
fn registers_are_retrieved_in_the_correct_order() {
179179
let mut rm = RegisterMap::new();
180-
for i in 0..3 {
180+
for _ in 0..3 {
181181
rm.push_scope();
182182
rm.create_reg("foo");
183183
}

luavm/src/lib/lua_values/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ mod tests {
321321
let bar_get = main.get_attr("bar").unwrap();
322322
assert_eq!(bar_get.kind(), LuaValKind::INT);
323323
assert_eq!(bar_get.to_int().unwrap(), 2);
324-
main.set_attr("bar", LuaVal::from(2.0));
324+
main.set_attr("bar", LuaVal::from(2.0)).unwrap();
325325
let bar_get = main.get_attr("bar").unwrap();
326326
assert_eq!(bar_get.kind(), LuaValKind::FLOAT);
327327
assert_float_absolute_eq!(bar_get.to_float().unwrap(), 2.0, 0.1);
@@ -553,7 +553,8 @@ mod tests {
553553
table2
554554
.get_attr("foo")
555555
.unwrap()
556-
.set_attr("foo", LuaVal::from(2));
556+
.set_attr("foo", LuaVal::from(2))
557+
.unwrap();
557558
assert_eq!(
558559
table3
559560
.get_attr("foo")

0 commit comments

Comments
 (0)