Commit 6b4b36553a

6b4b36553a6d6e49cb949e8cee1f9cd5621afe4e

parent: e82c0d1618

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2021-01-03 15:22 UTC

weechat-matrix: Fix some clippy warnings

Layout: unified · split

Cargo.lock +3 −3
@@ -3553,7 +3553,7 @@ dependencies = [
35533553[[package]]
35543554name = "weechat"
35553555version = "0.4.0"
3556source = "git+https://github.com/poljar/rust-weechat#4b0eca5174900be39ee9c2897c4e14e2057c44fb"
3556source = "git+https://github.com/poljar/rust-weechat#a5f3c46ed8ad186e9b7d640d5bb632d5342f1a7d"
35573557dependencies = [
35583558 "async-task",
35593559 "async-trait",
@@ -3570,7 +3570,7 @@ dependencies = [
35703570[[package]]
35713571name = "weechat-macro"
35723572version = "0.4.0"
3573source = "git+https://github.com/poljar/rust-weechat#4b0eca5174900be39ee9c2897c4e14e2057c44fb"
3573source = "git+https://github.com/poljar/rust-weechat#a5f3c46ed8ad186e9b7d640d5bb632d5342f1a7d"
35743574dependencies = [
35753575 "libc",
35763576 "proc-macro2",
@@ -3606,7 +3606,7 @@ dependencies = [
36063606[[package]]
36073607name = "weechat-sys"
36083608version = "0.4.0"
3609source = "git+https://github.com/poljar/rust-weechat#4b0eca5174900be39ee9c2897c4e14e2057c44fb"
3609source = "git+https://github.com/poljar/rust-weechat#a5f3c46ed8ad186e9b7d640d5bb632d5342f1a7d"
36103610dependencies = [
36113611 "bindgen",
36123612 "libc",
src/lib.rs +1 −1
@@ -11,7 +11,7 @@ mod room;
1111mod server;
1212
1313use std::{
14 cell::{Ref, RefCell, RefMut},
14 cell::{Ref, RefCell},
1515 collections::HashMap,
1616 rc::Rc,
1717};
src/room/mod.rs +4 −6
@@ -764,13 +764,11 @@ impl MatrixRoom {
764764 if let Some(PrevBatch::Forward(t)) = prev_batch.as_ref() {
765765 *prev_batch = Some(PrevBatch::Backwards(t.to_owned()));
766766 self.sort_messages();
767 } else if r.chunk.is_empty() {
768 *prev_batch = None;
767769 } else {
768 if r.chunk.is_empty() {
769 *prev_batch = None;
770 } else {
771 *prev_batch = r.end.map(PrevBatch::Backwards);
772 self.sort_messages();
773 }
770 *prev_batch = r.end.map(PrevBatch::Backwards);
771 self.sort_messages();
774772 }
775773 }
776774 }