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"]
1212[dependencies]
1313libc = "0.2.66"
1414futures = "0.3.1"
15url = "2.1.0"
16tokio = "0.2.0-alpha.6"
17async-std = { version = "1.2.0", features = [ "unstable" ] }
18async-task = { git = "https://github.com/async-rs/async-task/" }
15url = "2.1.1"
16tokio = { version = "0.2.9", features = [ "rt-threaded" ] }
17async-std = { version = "1.4.0", features = [ "unstable" ] }
18async-task = "1.2.1"
1919pipe-channel = "1.2.2"
2020clap = "2.33.0"
2121
src/config.rs +2 −2
@@ -1,12 +1,12 @@
11use crate::PLUGIN_NAME;
22use weechat::Weechat;
33
4pub struct Config(weechat::Config);
4pub struct Config(weechat::config::Config);
55
66impl Config {
77 pub fn new(weechat: &Weechat) -> Config {
88 let config = weechat
9 .config_new(PLUGIN_NAME, || {})
9 .config_new(PLUGIN_NAME, |_, _| {})
1010 .expect("Can't create new config");
1111
1212 Config(config)
src/server.rs +5 −2
@@ -4,6 +4,7 @@ use async_task::JoinHandle;
44use std::collections::HashMap;
55use std::sync::Arc;
66use std::time::Duration;
7use tokio::runtime;
78use tokio::runtime::Runtime;
89use url::Url;
910
@@ -102,7 +103,10 @@ impl MatrixServer {
102103 }
103104
104105 pub fn connect(&mut self) {
105 let runtime = Runtime::new().unwrap();
106 let runtime = runtime::Builder::new()
107 .threaded_scheduler()
108 .build()
109 .unwrap();
106110
107111 let send_client = self.client.clone();
108112 let (tx, rx) = async_channel(1000);
@@ -123,7 +127,6 @@ impl MatrixServer {
123127 pub fn disconnect(&mut self) {
124128 let connected_state = self.connected_state.take();
125129 if let Some(s) = connected_state {
126 s.runtime.shutdown_now();
127130 s.sync_receiver.cancel();
128131 }
129132 }