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

Do not rely on debug print format #30

Merged
merged 1 commit into from
Nov 2, 2020
Merged

Do not rely on debug print format #30

merged 1 commit into from
Nov 2, 2020

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Nov 2, 2020

Fixes #29

@@ -88,4 +87,8 @@ impl Version {
let nightly = channel.map_or(false, |c| c == "dev" || c == "nightly");
Ok(Self { minor, nightly })
}

fn print(&self) -> String {
format!("Version {{ minor: {}, nightly: {} }}\n", self.minor, self.nightly)
Copy link
Owner Author

Choose a reason for hiding this comment

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

I don't think Display format is also guaranteed by Rust, but I don't think u32 and bool's Display (ToString) format will be invalid literal.

@taiki-e
Copy link
Owner Author

taiki-e commented Nov 2, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 2, 2020

Build succeeded:

@bors bors bot merged commit c955c2b into master Nov 2, 2020
@bors bors bot deleted the debug branch November 2, 2020 18:31
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.

Don't rely on debug print format
1 participant