update libraries

master
Ondřej Hruška 3 years ago
parent ded6d806f9
commit 3c7a84a124
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 12
      Cargo.toml
  2. 5
      src/lib.rs

@ -15,27 +15,27 @@ doc-comment = "0.3"
envy = { version = "0.4.0", optional = true } envy = { version = "0.4.0", optional = true }
hyper-old-types = "0.11.0" hyper-old-types = "0.11.0"
isolang = { version = "1.0", features = ["serde_serialize"] } isolang = { version = "1.0", features = ["serde_serialize"] }
log = "0.4.6" log = "^0.4"
reqwest = { version = "0.10.8", default-features = false, features = ["json", "blocking"] } reqwest = { version = "0.11.4", default-features = false, features = ["json", "blocking", "multipart"] }
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
serde_json = "1" serde_json = "1"
serde_urlencoded = "0.6.1" serde_urlencoded = "0.6.1"
serde_qs = "0.8.4" serde_qs = "0.8.4"
url = "2.1.1" url = "2.1.1"
tap-reader = "1" tap-reader = "1"
toml = { version = "0.5.0", optional = true } toml = { version = "^0.5.0", optional = true }
tungstenite = "0.11.0" tungstenite = "0.15.0"
[dependencies.chrono] [dependencies.chrono]
version = "0.4" version = "0.4"
features = ["serde"] features = ["serde"]
[features] [features]
default = ["reqwest/default-tls"] default = ["reqwest/default-tls","tungstenite/native-tls"]
json = [] json = []
env = ["envy"] env = ["envy"]
all = ["toml", "json", "env"] all = ["toml", "json", "env"]
rustls-tls = ["reqwest/rustls-tls"] rustls-tls = ["reqwest/rustls-tls","tungstenite/__rustls-tls"]
nightly = [] nightly = []
[dev-dependencies] [dev-dependencies]

@ -76,7 +76,6 @@ use std::{borrow::Cow, io::BufRead, ops};
use reqwest::blocking::{multipart, Client, RequestBuilder, Response}; use reqwest::blocking::{multipart, Client, RequestBuilder, Response};
use tap_reader::Tap; use tap_reader::Tap;
use tungstenite::client::AutoStream;
use crate::{entities::prelude::*, page::Page}; use crate::{entities::prelude::*, page::Page};
@ -90,6 +89,8 @@ pub use crate::{
status_builder::{NewStatus, StatusBuilder}, status_builder::{NewStatus, StatusBuilder},
}; };
pub use isolang::Language; pub use isolang::Language;
use tungstenite::stream::MaybeTlsStream;
use std::net::TcpStream;
/// Registering your App /// Registering your App
pub mod apps; pub mod apps;
@ -650,7 +651,7 @@ impl MastodonClient for Mastodon {
#[derive(Debug)] #[derive(Debug)]
/// WebSocket newtype so that EventStream can be implemented without coherency /// WebSocket newtype so that EventStream can be implemented without coherency
/// issues /// issues
pub struct WebSocket(tungstenite::protocol::WebSocket<AutoStream>); pub struct WebSocket(tungstenite::protocol::WebSocket<MaybeTlsStream<TcpStream>>);
/// A type that streaming events can be read from /// A type that streaming events can be read from
pub trait EventStream { pub trait EventStream {

Loading…
Cancel
Save