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

base32::EncodingError does not implement std::fmt::Display #1

Closed
lunemec opened this issue Jul 28, 2017 · 1 comment · Fixed by #2
Closed

base32::EncodingError does not implement std::fmt::Display #1

lunemec opened this issue Jul 28, 2017 · 1 comment · Fixed by #2
Assignees

Comments

@lunemec
Copy link

lunemec commented Jul 28, 2017

Hi,
love your library, however there is a tiny bug :)

This code does not compile:

let ulid = match Ulid::from_string(&file_ulid) {
        Ok(ulid) => ulid,
        Err(e) => {
            println!("Unable to parse ULID: {}", e);
            return
        }
    };
error[E0277]: the trait bound `ulid::EncodingError: std::fmt::Display` is not satisfied
  --> src/show.rs:97:50
   |
97 |             println!("Unable to parse ULID: {}", e);
   |                                                  ^ `ulid::EncodingError` cannot be formatted with the default formatter; try using `:?` instead if you are using a format string
   |
   = help: the trait `std::fmt::Display` is not implemented for `ulid::EncodingError`
   = note: required by `std::fmt::Display::fmt`

It works when formatting it with {:?}, but all other std errors support fmt::Display trait.

@dylanhart
Copy link
Owner

dylanhart commented Jul 28, 2017

Thank you for reporting this issue. It has been fixed and a new version has been published. If find any more issues or wish something was different don't hesitate to make another issue.

[dependencies]
ulid = "0.2.2"

Thanks

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 a pull request may close this issue.

2 participants