Skip to content

Commit 105076a

Browse files
authored
Run rustfmt on the repository (#217)
1 parent ac6a64d commit 105076a

File tree

14 files changed

+794
-444
lines changed

14 files changed

+794
-444
lines changed

hlua/examples/sound-api.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ fn main() {
1313
sound_namespace.set("new", hlua::function0(|| Sound::new()));
1414
}
1515

16-
lua.execute::<()>(r#"
16+
lua.execute::<()>(
17+
r#"
1718
s = Sound.new();
1819
s:play();
1920
@@ -23,8 +24,9 @@ fn main() {
2324
s:stop();
2425
print("is the sound playing:", s:is_playing());
2526
26-
"#)
27-
.unwrap();
27+
"#,
28+
)
29+
.unwrap();
2830
}
2931

3032
// this `Sound` struct is the object that we will use to demonstrate hlua
@@ -43,8 +45,10 @@ implement_lua_push!(Sound, |mut metatable| {
4345

4446
index.set("stop", hlua::function1(|snd: &mut Sound| snd.stop()));
4547

46-
index.set("is_playing",
47-
hlua::function1(|snd: &Sound| snd.is_playing()));
48+
index.set(
49+
"is_playing",
50+
hlua::function1(|snd: &Sound| snd.is_playing()),
51+
);
4852
});
4953

5054
// this macro implements the require traits so that we can *read* the object back

0 commit comments

Comments
 (0)