Skip to content

refactor(error): remove redundant parts of error names #463

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

Merged
merged 1 commit into from
May 5, 2015

Conversation

seanmonstar
Copy link
Member

The old names followed the old style of including the module name and
"Error" in each variant. The new style is to refer to an error from its
owning module, and variants are now scoped to their enum, so there's no
need to include the enum name in the variant name.

BREAKING CHANGE: The terms Http and Error have been removed from the Error
type and its variants. HttpError should now be accessed as hyper::Error,
and variants like HttpIoError should be accessed as Error::Io.

@@ -3,7 +3,7 @@ use std::str::FromStr;
use url::Url;
use url::ParseError as UrlError;

use error::HttpError;
use error::Error;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be just use Error;

@reem
Copy link
Contributor

reem commented Apr 16, 2015

LGTM except for that nit

@seanmonstar
Copy link
Member Author

Just holding on merging till I've completed some other breaking changes, and they can all be part of 0.4

The old names followed the old style of including the module name and
"Error" in each variant. The new style is to refer to an error from its
owning module, and variants are now scoped to their enum, so there's no
need to include the enum name in the variant name.

BREAKING CHANGE: The terms `Http` and `Error` have been removed from the Error
  type and its variants. `HttpError` should now be accessed as `hyper::Error`,
  and variants like `HttpIoError` should be accessed as `Error::Io`.
seanmonstar added a commit that referenced this pull request May 5, 2015
refactor(error): remove redundant parts of error names
@seanmonstar seanmonstar merged commit 67340a5 into master May 5, 2015
@seanmonstar seanmonstar deleted the error-rename branch May 5, 2015 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants