Remove url 2.x

I thought tungstenite needed it, but it doesn't.
master
leo60228 5 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_json = "1"
serde_urlencoded = "0.6.1" serde_urlencoded = "0.6.1"
serde_qs = "0.4.5" serde_qs = "0.4.5"
url = "1"
tap-reader = "1" tap-reader = "1"
try_from = "0.3.2" try_from = "0.3.2"
toml = { version = "0.5.0", optional = true } toml = { version = "0.5.0", optional = true }
@ -25,8 +26,6 @@ hyper-old-types = "0.11.0"
envy = { version = "0.4.0", optional = true } envy = { version = "0.4.0", optional = true }
log = "0.4.6" log = "0.4.6"
tungstenite = "0.10.1" tungstenite = "0.10.1"
url = "2.1.1"
url1x = { version = "1", package = "url" }
[dependencies.chrono] [dependencies.chrono]
version = "0.4" version = "0.4"

@ -12,7 +12,6 @@ use tomlcrate::de::Error as TomlDeError;
#[cfg(feature = "toml")] #[cfg(feature = "toml")]
use tomlcrate::ser::Error as TomlSerError; use tomlcrate::ser::Error as TomlSerError;
use url::ParseError as UrlError; use url::ParseError as UrlError;
use url1x::ParseError as ReqwestUrlError;
use tungstenite::error::Error as WebSocketError; use tungstenite::error::Error as WebSocketError;
/// Convience type over `std::result::Result` with `Error` as the error type. /// Convience type over `std::result::Result` with `Error` as the error type.
@ -35,8 +34,6 @@ pub enum Error {
Io(IoError), Io(IoError),
/// Wrapper around the `url::ParseError` struct. /// Wrapper around the `url::ParseError` struct.
Url(UrlError), Url(UrlError),
/// Wrapper around the `url::ParseError` struct.
ReqwestUrl(ReqwestUrlError),
/// Missing Client Id. /// Missing Client Id.
ClientIdRequired, ClientIdRequired,
/// Missing Client Secret. /// Missing Client Secret.
@ -85,7 +82,6 @@ impl error::Error for Error {
Error::Http(ref e) => e, Error::Http(ref e) => e,
Error::Io(ref e) => e, Error::Io(ref e) => e,
Error::Url(ref e) => e, Error::Url(ref e) => e,
Error::ReqwestUrl(ref e) => e,
#[cfg(feature = "toml")] #[cfg(feature = "toml")]
Error::TomlSer(ref e) => e, Error::TomlSer(ref e) => e,
#[cfg(feature = "toml")] #[cfg(feature = "toml")]
@ -146,7 +142,6 @@ from! {
SerdeError, Serde, SerdeError, Serde,
UrlEncodedError, UrlEncoded, UrlEncodedError, UrlEncoded,
UrlError, Url, UrlError, Url,
ReqwestUrlError, ReqwestUrl,
ApiError, Api, ApiError, Api,
#[cfg(feature = "toml")] TomlSerError, TomlSer, #[cfg(feature = "toml")] TomlSerError, TomlSer,
#[cfg(feature = "toml")] TomlDeError, TomlDe, #[cfg(feature = "toml")] TomlDeError, TomlDe,

@ -89,7 +89,6 @@ extern crate serde_urlencoded;
extern crate tap_reader; extern crate tap_reader;
extern crate try_from; extern crate try_from;
extern crate url; extern crate url;
extern crate url1x;
extern crate tungstenite; extern crate tungstenite;
#[cfg(feature = "env")] #[cfg(feature = "env")]
@ -776,7 +775,7 @@ impl<H: HttpSend> MastodonBuilder<H> {
pub struct MastodonUnauth<H: HttpSend = HttpSender> { pub struct MastodonUnauth<H: HttpSend = HttpSender> {
client: Client, client: Client,
http_sender: H, http_sender: H,
base: reqwest::Url, base: url::Url,
} }
impl MastodonUnauth<HttpSender> { impl MastodonUnauth<HttpSender> {
@ -790,13 +789,13 @@ impl MastodonUnauth<HttpSender> {
Ok(MastodonUnauth { Ok(MastodonUnauth {
client: Client::new(), client: Client::new(),
http_sender: HttpSender, http_sender: HttpSender,
base: reqwest::Url::parse(&base)?, base: url::Url::parse(&base)?,
}) })
} }
} }
impl<H: HttpSend> MastodonUnauth<H> { 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)?) Ok(self.base.join(url)?)
} }

@ -3,7 +3,7 @@ use entities::itemsiter::ItemsIter;
use hyper_old_types::header::{parsing, Link, RelationType}; use hyper_old_types::header::{parsing, Link, RelationType};
use reqwest::{header::LINK, Response}; use reqwest::{header::LINK, Response};
use serde::Deserialize; use serde::Deserialize;
use reqwest::Url; use url::Url;
use http_send::HttpSend; use http_send::HttpSend;

@ -2,7 +2,7 @@ use std::borrow::Cow;
use reqwest::{Client, RequestBuilder, Response}; use reqwest::{Client, RequestBuilder, Response};
use try_from::TryInto; 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 apps::{App, AppBuilder};
use http_send::{HttpSend, HttpSender}; use http_send::{HttpSend, HttpSender};

Loading…
Cancel
Save