Commit 28740e06fc

28740e06fcc4708e2e199a91cd57e64f832ed2d1

parent: ee6177330e

Unsigned

Valentin Brandl <vbrandl@riseup.net> · 2020-05-09 10:31 UTC
committer: <dkasak@termina.org.uk>

Fix some clippy lints

Layout: unified · split

src/lib.rs −1
@@ -13,7 +13,6 @@ mod server;
1313use std::cell::{Ref, RefCell, RefMut};
1414use std::collections::HashMap;
1515use std::rc::Rc;
16use tracing_subscriber;
1716
1817use weechat::{
1918 buffer::Buffer,
src/render.rs +1 −1
@@ -108,7 +108,7 @@ trait HasUrlOrFile {
108108 fn resolve_url(&self) -> &str {
109109 // the file is either encrypted or not encrypted so either `url` or `file` must
110110 // exist and unwrapping will never panic
111 self.url().or(self.file()).unwrap()
111 self.url().or_else(|| self.file()).unwrap()
112112 }
113113}
114114
src/room_buffer.rs +1 −2
@@ -75,7 +75,6 @@ impl BufferInputCallbackAsync for MatrixRoom {
7575 c.send_message(&room_id, &input).await;
7676 } else {
7777 buffer.print("Error not connected");
78 return;
7978 }
8079 }
8180}
@@ -173,7 +172,7 @@ impl RoomBuffer {
173172
174173 if room_name == "#" {
175174 "##".to_owned()
176 } else if room_name.starts_with("#") {
175 } else if room_name.starts_with('#') {
177176 room_name
178177 } else {
179178 // TODO: only do this for non-direct chats