Skip to content

Check if status and subject in badge generator is not empty #326

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

Merged
merged 1 commit into from
Apr 11, 2019

Conversation

bnjjj
Copy link
Contributor

@bnjjj bnjjj commented Apr 5, 2019

After using this crate in my project, it seems that if we don't check that status or subject is not empty we encounter a panic due to line https://github.com/rust-lang/docs.rs/blob/master/src/web/badge/badge.rs#L130 because we make a cast to u32 and so we return a negative number which is not possible when we use u32

@bnjjj bnjjj force-pushed the fix_empty_badge branch from 24567f8 to cd08794 Compare April 5, 2019 22:30
@bnjjj
Copy link
Contributor Author

bnjjj commented Apr 10, 2019

up please :(

Copy link
Member

@QuietMisdreavus QuietMisdreavus left a comment

Choose a reason for hiding this comment

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

Thanks so much, and sorry for the delay! I'll go ahead and deploy this.

@QuietMisdreavus QuietMisdreavus merged commit 8784d09 into rust-lang:master Apr 11, 2019
@QuietMisdreavus
Copy link
Member

Should be live now!

@bnjjj
Copy link
Contributor Author

bnjjj commented Apr 12, 2019

Thanks a lot :)

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