Commit a67ad42e15

a67ad42e15d27546a73bef80a1049031245f6eb0

parent: 9a1ee26769

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2020-01-11 12:21 UTC

Upgrade the deps.

Layout: unified · split

Cargo.toml +4 −4
@@ -12,10 +12,10 @@ crate-type = ["dylib"]
12[dependencies] 12[dependencies]
13libc = "0.2.66" 13libc = "0.2.66"
14futures = "0.3.1" 14futures = "0.3.1"
15url = "2.1.0" 15url = "2.1.1"
16tokio = "0.2.0-alpha.6" 16tokio = { version = "0.2.9", features = [ "rt-threaded" ] }
17async-std = { version = "1.2.0", features = [ "unstable" ] } 17async-std = { version = "1.4.0", features = [ "unstable" ] }
18async-task = { git = "https://github.com/async-rs/async-task/" } 18async-task = "1.2.1"
19pipe-channel = "1.2.2" 19pipe-channel = "1.2.2"
20clap = "2.33.0" 20clap = "2.33.0"
21 21
src/config.rs +2 −2
@@ -1,12 +1,12 @@
1use crate::PLUGIN_NAME; 1use crate::PLUGIN_NAME;
2use weechat::Weechat; 2use weechat::Weechat;
3 3
4pub struct Config(weechat::Config); 4pub struct Config(weechat::config::Config);
5 5
6impl Config { 6impl Config {
7 pub fn new(weechat: &Weechat) -> Config { 7 pub fn new(weechat: &Weechat) -> Config {
8 let config = weechat 8 let config = weechat
9 .config_new(PLUGIN_NAME, || {}) 9 .config_new(PLUGIN_NAME, |_, _| {})
10 .expect("Can't create new config"); 10 .expect("Can't create new config");
11 11
12 Config(config) 12 Config(config)
src/server.rs +5 −2
@@ -4,6 +4,7 @@ use async_task::JoinHandle;
4use std::collections::HashMap; 4use std::collections::HashMap;
5use std::sync::Arc; 5use std::sync::Arc;
6use std::time::Duration; 6use std::time::Duration;
7use tokio::runtime;
7use tokio::runtime::Runtime; 8use tokio::runtime::Runtime;
8use url::Url; 9use url::Url;
9 10
@@ -102,7 +103,10 @@ impl MatrixServer {
102 } 103 }
103 104
104 pub fn connect(&mut self) { 105 pub fn connect(&mut self) {
105 let runtime = Runtime::new().unwrap(); 106 let runtime = runtime::Builder::new()
107 .threaded_scheduler()
108 .build()
109 .unwrap();
106 110
107 let send_client = self.client.clone(); 111 let send_client = self.client.clone();
108 let (tx, rx) = async_channel(1000); 112 let (tx, rx) = async_channel(1000);
@@ -123,7 +127,6 @@ impl MatrixServer {
123 pub fn disconnect(&mut self) { 127 pub fn disconnect(&mut self) {
124 let connected_state = self.connected_state.take(); 128 let connected_state = self.connected_state.take();
125 if let Some(s) = connected_state { 129 if let Some(s) = connected_state {
126 s.runtime.shutdown_now();
127 s.sync_receiver.cancel(); 130 s.sync_receiver.cancel();
128 } 131 }
129 } 132 }