Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roll back impl core::error::Error #994

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion idna/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "idna"
version = "1.0.3"
version = "1.0.4"
authors = ["The rust-url developers"]
description = "IDNA (Internationalizing Domain Names in Applications) and Punycode."
keywords = ["no_std", "web", "http"]
Expand Down
3 changes: 0 additions & 3 deletions idna/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ impl From<Errors> for Result<(), Errors> {
#[cfg(feature = "std")]
impl std::error::Error for Errors {}

#[cfg(not(feature = "std"))]
impl core::error::Error for Errors {}

impl core::fmt::Display for Errors {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
core::fmt::Debug::fmt(self, f)
Expand Down
4 changes: 2 additions & 2 deletions url/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

name = "url"
# When updating version, also modify html_root_url in the lib.rs
version = "2.5.3"
version = "2.5.4"
authors = ["The rust-url developers"]

description = "URL library for Rust, based on the WHATWG URL Standard"
Expand All @@ -26,7 +26,7 @@ wasm-bindgen-test = "0.3"

[dependencies]
form_urlencoded = { version = "1.2.1", path = "../form_urlencoded", default-features = false, features = ["alloc"] }
idna = { version = "1.0.3", path = "../idna", default-features = false, features = ["alloc", "compiled_data"] }
idna = { version = "1.0.4", path = "../idna", default-features = false, features = ["alloc", "compiled_data"] }
percent-encoding = { version = "2.3.1", path = "../percent_encoding", default-features = false, features = ["alloc"] }
serde = { version = "1.0", optional = true, features = ["derive"] }

Expand Down
11 changes: 1 addition & 10 deletions url/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ url = { version = "2", features = ["debugger_visualizer"] }
*/

#![no_std]
#![doc(html_root_url = "https://docs.rs/url/2.5.3")]
#![doc(html_root_url = "https://docs.rs/url/2.5.4")]
#![cfg_attr(
feature = "debugger_visualizer",
debugger_visualizer(natvis_file = "../../debug_metadata/url.natvis")
Expand Down Expand Up @@ -1398,10 +1398,7 @@ impl Url {
/// ```
/// use url::Url;
///
/// # #[cfg(feature = "std")]
/// # use std::error::Error;
/// # #[cfg(not(feature = "std"))]
/// # use core::error::Error;
///
/// # fn run() -> Result<(), Box<dyn Error>> {
/// let url = Url::parse("https://example.com/foo/bar")?;
Expand Down Expand Up @@ -1868,10 +1865,7 @@ impl Url {
/// ```
/// use url::Url;
///
/// # #[cfg(feature = "std")]
/// # use std::error::Error;
/// # #[cfg(not(feature = "std"))]
/// # use core::error::Error;
///
/// # fn run() -> Result<(), Box<dyn Error>> {
/// let mut url = Url::parse("ssh://example.net:2048/")?;
Expand All @@ -1891,10 +1885,7 @@ impl Url {
/// ```rust
/// use url::Url;
///
/// # #[cfg(feature = "std")]
/// # use std::error::Error;
/// # #[cfg(not(feature = "std"))]
/// # use core::error::Error;
///
/// # fn run() -> Result<(), Box<dyn Error>> {
/// let mut url = Url::parse("https://example.org/")?;
Expand Down
3 changes: 0 additions & 3 deletions url/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ macro_rules! simple_enum_error {
#[cfg(feature = "std")]
impl std::error::Error for ParseError {}

#[cfg(not(feature = "std"))]
impl core::error::Error for ParseError {}

simple_enum_error! {
EmptyHost => "empty host",
IdnaError => "invalid international domain name",
Expand Down
15 changes: 0 additions & 15 deletions url/src/path_segments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ use core::str;
/// ```rust
/// use url::Url;
///
/// # #[cfg(feature = "std")]
/// # use std::error::Error;
/// # #[cfg(not(feature = "std"))]
/// # use core::error::Error;
///
/// # fn run() -> Result<(), Box<dyn Error>> {
/// let mut url = Url::parse("mailto:[email protected]")?;
Expand Down Expand Up @@ -84,10 +81,7 @@ impl<'a> PathSegmentsMut<'a> {
/// ```rust
/// use url::Url;
///
/// # #[cfg(feature = "std")]
/// # use std::error::Error;
/// # #[cfg(not(feature = "std"))]
/// # use core::error::Error;
///
/// # fn run() -> Result<(), Box<dyn Error>> {
/// let mut url = Url::parse("https://github.com/servo/rust-url/")?;
Expand Down Expand Up @@ -116,10 +110,7 @@ impl<'a> PathSegmentsMut<'a> {
/// ```rust
/// use url::Url;
///
/// # #[cfg(feature = "std")]
/// # use std::error::Error;
/// # #[cfg(not(feature = "std"))]
/// # use core::error::Error;
///
/// # fn run() -> Result<(), Box<dyn Error>> {
/// let mut url = Url::parse("https://github.com/servo/rust-url/")?;
Expand Down Expand Up @@ -195,10 +186,7 @@ impl<'a> PathSegmentsMut<'a> {
/// ```rust
/// use url::Url;
///
/// # #[cfg(feature = "std")]
/// # use std::error::Error;
/// # #[cfg(not(feature = "std"))]
/// # use core::error::Error;
///
/// # fn run() -> Result<(), Box<dyn Error>> {
/// let mut url = Url::parse("https://github.com/")?;
Expand All @@ -219,10 +207,7 @@ impl<'a> PathSegmentsMut<'a> {
/// ```rust
/// use url::Url;
///
/// # #[cfg(feature = "std")]
/// # use std::error::Error;
/// # #[cfg(not(feature = "std"))]
/// # use core::error::Error;
///
/// # fn run() -> Result<(), Box<dyn Error>> {
/// let mut url = Url::parse("https://github.com/servo")?;
Expand Down
Loading