Skip to content

fix: format ErrorKind to avoid compilation error#2548

Closed
EricCrosson wants to merge 1 commit into
helix-editor:masterfrom
EricCrosson:fix-compilation-error
Closed

fix: format ErrorKind to avoid compilation error#2548
EricCrosson wants to merge 1 commit into
helix-editor:masterfrom
EricCrosson:fix-compilation-error

Conversation

@EricCrosson

Copy link
Copy Markdown
Contributor

On one of my machines (just one 🤔) compiling helix on 6801b28
yields the following error

error[E0277]: `ErrorKind` doesn't implement `std::fmt::Display`
   --> helix-view/src/handlers/dap.rs:305:81
    |
305 | ...                   e => panic!("Error to start debug console: {}", e),
    |                                                                       ^ `ErrorKind` cannot be formatted with the default formatter
    |
    = help: the trait `std::fmt::Display` is not implemented for `ErrorKind`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: this error originates in the macro `$crate::const_format_args` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.
error: could not compile `helix-view` due to previous error

This commit takes the compiler's advice and uses the pretty-print
formatter.

On one of my machines (just one 🤔) compiling helix on 6801b28
yields the following error

```
error[E0277]: `ErrorKind` doesn't implement `std::fmt::Display`
   --> helix-view/src/handlers/dap.rs:305:81
    |
305 | ...                   e => panic!("Error to start debug console: {}", e),
    |                                                                       ^ `ErrorKind` cannot be formatted with the default formatter
    |
    = help: the trait `std::fmt::Display` is not implemented for `ErrorKind`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: this error originates in the macro `$crate::const_format_args` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.
error: could not compile `helix-view` due to previous error
```

This commit takes the compiler's advice and uses the pretty-print
formatter.
@archseer

Copy link
Copy Markdown
Member

Fixed in #2529

@archseer archseer closed this May 23, 2022
@EricCrosson EricCrosson deleted the fix-compilation-error branch May 23, 2022 17:01
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