Remove url 2.x

I thought tungstenite needed it, but it doesn't.
master
leo60228 4 years ago committed by Paul Woolcock
parent 791bc83387
commit 7e67e10bc4
  1. 3
      Cargo.toml
  2. 5
      src/errors.rs
  3. 7
      src/lib.rs
  4. 2
      src/page.rs
  5. 2
      src/registration.rs

@ -18,6 +18,7 @@ serde_derive = "1"
serde_json = "1"
serde_urlencoded = "0.6.1"
serde_qs = "0.4.5"
url = "1"
tap-reader = "1"
try_from = "0.3.2"
toml = { version = "0.5.0", optional = true }
@ -25,8 +26,6 @@ hyper-old-types = "0.11.0"
envy = { version = "0.4.0", optional = true }
log = "0.4.6"
tungstenite = "0.10.1"
url = "2.1.1"
url1x = { version = "1", package = "url" }
[dependencies.chrono]
version = "0.4"

@ -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,

@ -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)?)
}

@ -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;

@ -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};

Loading…
Cancel
Save