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

Better message for LineOverflow error #1268

Merged
merged 1 commit into from
Jan 9, 2017
Merged

Conversation

stepancheg
Copy link
Contributor

(with current length and configured limit)

(with current length and configured limit)
Copy link
Member

@nrc nrc left a comment

Choose a reason for hiding this comment

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

Looks good, thank you! What do you think of the alternative message format?

ErrorKind::LineOverflow => write!(fmt, "line exceeded maximum length"),
ErrorKind::LineOverflow(actual, configured) => {
write!(fmt,
"line length {} exceeded maximum length {}",
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer a format like "line exceeded maximum length (maximum: 100, found: 102)"

Copy link
Contributor Author

@stepancheg stepancheg Jan 8, 2017

Choose a reason for hiding this comment

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

Fine with me. I've updated the PR.

@nrc
Copy link
Member

nrc commented Jan 9, 2017

Thank you!

@nrc nrc merged commit 1c22d85 into rust-lang:master Jan 9, 2017
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