1
0
Fork 0
forked from wry/wry

all: address clippy lints

This commit is contained in:
Julian Orth 2022-08-13 17:46:23 +02:00
parent 0fe59effe2
commit ae991b9038
28 changed files with 84 additions and 70 deletions

View file

@ -169,7 +169,7 @@ fn parse_components(args: &[String]) -> Vec<Component> {
args.push_front(arg[pos..].to_string());
arg = &arg[..pos];
}
let comp = match &arg[..] {
let comp = match arg {
"minutes" | "minute" | "min" | "m" => Component::Minutes(arg.to_string()),
"seconds" | "second" | "sec" | "s" => Component::Seconds(arg.to_string()),
_ => fatal!("Could not parse `{}`", arg),

View file

@ -43,10 +43,10 @@ async fn run(screenshot: Rc<Screenshot>) {
id: sid,
});
let result = Rc::new(AsyncQueue::new());
Error::handle(&tc, sid, result.clone(), |res, err| {
Error::handle(tc, sid, result.clone(), |res, err| {
res.push(Err(err.msg.to_owned()));
});
Dmabuf::handle(&tc, sid, result.clone(), |res, buf| {
Dmabuf::handle(tc, sid, result.clone(), |res, buf| {
res.push(Ok(buf));
});
let buf = match result.pop().await {

View file

@ -44,7 +44,7 @@ async fn run(seat_test: Rc<SeatTest>) {
let tc = &seat_test.tc;
let comp = tc.jay_compositor().await;
tc.send(GetSeats { self_id: comp });
Seat::handle(&tc, comp, seat_test.clone(), |st, seat| {
Seat::handle(tc, comp, seat_test.clone(), |st, seat| {
st.names
.borrow_mut()
.insert(seat.id, Rc::new(seat.name.to_string()));