Remove url 2.x

I thought tungstenite needed it, but it doesn't.
This commit is contained in:
leo60228
2020-06-08 14:46:16 -04:00
committed by Paul Woolcock
parent 791bc83387
commit 7e67e10bc4
5 changed files with 6 additions and 13 deletions
-5
View File
@@ -12,7 +12,6 @@ use tomlcrate::de::Error as TomlDeError;
#[cfg(feature = "toml")]
use tomlcrate::ser::Error as TomlSerError;
use url::ParseError as UrlError;
use url1x::ParseError as ReqwestUrlError;
use tungstenite::error::Error as WebSocketError;
/// Convience type over `std::result::Result` with `Error` as the error type.
@@ -35,8 +34,6 @@ pub enum Error {
Io(IoError),
/// Wrapper around the `url::ParseError` struct.
Url(UrlError),
/// Wrapper around the `url::ParseError` struct.
ReqwestUrl(ReqwestUrlError),
/// Missing Client Id.
ClientIdRequired,
/// Missing Client Secret.
@@ -85,7 +82,6 @@ impl error::Error for Error {
Error::Http(ref e) => e,
Error::Io(ref e) => e,
Error::Url(ref e) => e,
Error::ReqwestUrl(ref e) => e,
#[cfg(feature = "toml")]
Error::TomlSer(ref e) => e,
#[cfg(feature = "toml")]
@@ -146,7 +142,6 @@ from! {
SerdeError, Serde,
UrlEncodedError, UrlEncoded,
UrlError, Url,
ReqwestUrlError, ReqwestUrl,
ApiError, Api,
#[cfg(feature = "toml")] TomlSerError, TomlSer,
#[cfg(feature = "toml")] TomlDeError, TomlDe,
+3 -4
View File
@@ -89,7 +89,6 @@ extern crate serde_urlencoded;
extern crate tap_reader;
extern crate try_from;
extern crate url;
extern crate url1x;
extern crate tungstenite;
#[cfg(feature = "env")]
@@ -776,7 +775,7 @@ impl<H: HttpSend> MastodonBuilder<H> {
pub struct MastodonUnauth<H: HttpSend = HttpSender> {
client: Client,
http_sender: H,
base: reqwest::Url,
base: url::Url,
}
impl MastodonUnauth<HttpSender> {
@@ -790,13 +789,13 @@ impl MastodonUnauth<HttpSender> {
Ok(MastodonUnauth {
client: Client::new(),
http_sender: HttpSender,
base: reqwest::Url::parse(&base)?,
base: url::Url::parse(&base)?,
})
}
}
impl<H: HttpSend> MastodonUnauth<H> {
fn route(&self, url: &str) -> Result<reqwest::Url> {
fn route(&self, url: &str) -> Result<url::Url> {
Ok(self.base.join(url)?)
}
+1 -1
View File
@@ -3,7 +3,7 @@ use entities::itemsiter::ItemsIter;
use hyper_old_types::header::{parsing, Link, RelationType};
use reqwest::{header::LINK, Response};
use serde::Deserialize;
use reqwest::Url;
use url::Url;
use http_send::HttpSend;
+1 -1
View File
@@ -2,7 +2,7 @@ use std::borrow::Cow;
use reqwest::{Client, RequestBuilder, Response};
use try_from::TryInto;
use url1x::percent_encoding::{utf8_percent_encode, DEFAULT_ENCODE_SET};
use url::percent_encoding::{utf8_percent_encode, DEFAULT_ENCODE_SET};
use apps::{App, AppBuilder};
use http_send::{HttpSend, HttpSender};