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

Adds fmt::Debug for dyn SerialPort and related enums. #91

Merged
merged 2 commits into from
Apr 4, 2023

Conversation

nathansizemore
Copy link
Contributor

Helpful in circumstances where you want to extract the error from an open and dip out:

let r = serialport::new().open();
if r.is_err() {
    let e = r.unwrap_err(); // dyn SerialPort does not implement fmt::Debug
}

@eldruin
Copy link
Contributor

eldruin commented Apr 4, 2023

Sounds like a good idea, thank you!
However, the current version does not build in the MSRV version because the format string capture used is only available in Rust >= 1.58.0. Could you change that to make it compatible?

Copy link
Contributor

@eldruin eldruin left a comment

Choose a reason for hiding this comment

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

Thank you!

@eldruin eldruin merged commit 9c0285a into serialport:main Apr 4, 2023
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