Skip to content
Snippets Groups Projects
Commit 6a859116 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

chore: fix clippy warnings

parent b941d00c
No related branches found
No related tags found
1 merge request!214Chore/clippy warnings
Pipeline #10878 failed
......@@ -56,7 +56,8 @@ struct StrSerializer {
impl slog::Serializer for StrSerializer {
fn emit_arguments(&mut self, key: slog::Key, val: &std::fmt::Arguments) -> slog::Result {
self.str.push_str(&format!(", {}: {}", key, val));
use std::fmt::Write;
write!(&mut self.str, ", {key}: {val}").unwrap();
Ok(())
}
}
......@@ -300,14 +300,11 @@ inventory::submit!(crate::InnerTest {
// Set up on_disconnect trigger
let on_disconnect_cond = Rc::new(fiber::Cond::new());
let on_disconnect: tlua::LuaFunction<_> =
l.eval("return box.session.on_disconnect").unwrap();
let () = on_disconnect
.call_with_args({
let cond = on_disconnect_cond.clone();
tlua::function0(move || cond.broadcast())
})
.unwrap();
l.exec_with("box.session.on_disconnect(...)", {
let cond = on_disconnect_cond.clone();
tlua::function0(move || cond.broadcast())
})
.unwrap();
// Wait for it
on_disconnect_cond
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment