Commit 78f0d09198
78f0d09198d6950e8d50205bd4ac92ab5a5a0bec
parent: 9a149eea78
Unsigned
Damir Jelić <poljar@termina.org.uk> · 2020-10-18 10:05 UTC
weechat-matrix: Formatting fixes.
Layout: unified · split
src/commands/devices.rs
+1 −3
| @@ -80,9 +80,7 @@ impl DevicesCommand { |
| 80 | let devices: Vec<DeviceIdBox> = devices |
80 | let devices: Vec<DeviceIdBox> = devices |
| 81 | .vals |
81 | .vals |
| 82 | .iter() |
82 | .iter() |
| 83 | .map(|d| { |
83 | .map(|d| d.clone().to_string_lossy().as_ref().into()) |
| 84 | d.clone().to_string_lossy().as_ref().into() |
| |
| 85 | }) |
| |
| 86 | .collect(); |
84 | .collect(); |
| 87 | Self::delete(servers, buffer, devices); |
85 | Self::delete(servers, buffer, devices); |
| 88 | } |
86 | } |
src/commands/mod.rs
+2 −2
| @@ -2,12 +2,12 @@ use crate::{config::ConfigHandle, Servers}; |
| 2 | use weechat::hooks::Command; |
2 | use weechat::hooks::Command; |
| 3 | |
3 | |
| 4 | mod devices; |
4 | mod devices; |
| 5 | mod matrix; |
| |
| 6 | mod keys; |
5 | mod keys; |
| |
6 | mod matrix; |
| 7 | |
7 | |
| 8 | use devices::DevicesCommand; |
8 | use devices::DevicesCommand; |
| 9 | use matrix::MatrixCommand; |
| |
| 10 | use keys::KeysCommand; |
9 | use keys::KeysCommand; |
| |
10 | use matrix::MatrixCommand; |
| 11 | |
11 | |
| 12 | pub struct Commands { |
12 | pub struct Commands { |
| 13 | _matrix: Command, |
13 | _matrix: Command, |
src/connection.rs
+7 −2
| @@ -1,6 +1,11 @@ |
| 1 | use std::{ |
1 | use std::{ |
| 2 | cell::RefCell, collections::BTreeMap, future::Future, path::PathBuf, |
2 | cell::RefCell, |
| 3 | rc::Rc, rc::Weak, sync::Arc, time::Duration, |
3 | collections::BTreeMap, |
| |
4 | future::Future, |
| |
5 | path::PathBuf, |
| |
6 | rc::{Rc, Weak}, |
| |
7 | sync::Arc, |
| |
8 | time::Duration, |
| 4 | }; |
9 | }; |
| 5 | |
10 | |
| 6 | use async_std::sync::{channel as async_channel, Receiver, Sender}; |
11 | use async_std::sync::{channel as async_channel, Receiver, Sender}; |
src/server.rs
+1 −2
| @@ -82,11 +82,10 @@ use weechat::{ |
| 82 | }; |
82 | }; |
| 83 | |
83 | |
| 84 | use crate::{ |
84 | use crate::{ |
| 85 | PLUGIN_NAME, |
| |
| 86 | config::Config, |
85 | config::Config, |
| 87 | connection::{Connection, InteractiveAuthInfo}, |
86 | connection::{Connection, InteractiveAuthInfo}, |
| 88 | room::RoomHandle, |
87 | room::RoomHandle, |
| 89 | ConfigHandle, |
88 | ConfigHandle, PLUGIN_NAME, |
| 90 | }; |
89 | }; |
| 91 | |
90 | |
| 92 | #[derive(Debug)] |
91 | #[derive(Debug)] |