servo / servo/rust-url

Replace `()` error types with specific types that implement Error

Open
#299 12 comments 8 reactions 1 assignee View on GitHub

@nox is already working on this.

Since Jul 18, 2019.

breaking-change
Dominant language
Rust
Stars
1.6k
Forks
406
PR merge metrics
No merged PRs in 30d

Description

There are a number of methods in url that return Result<_, ()>. () though does not implement Error and so does not inter operate cleanly with callers that want to treat the result as Error (like error-chain).

In today's Rust the best pattern for this is probably to create a single Error enum for the entire crate to share and return it everywhere.

Would require a major version bump.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.