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

Made libflate functions return Options instead of outright failing #13389

Closed
wants to merge 1 commit into from

Conversation

Tobba
Copy link
Contributor

@Tobba Tobba commented Apr 7, 2014

This should make the library slightly more pleasant to use, and make the compiler errors related to corrupt rlibs more sensible (i.e not failing on an assert)

In addition, Github seems to think I'm a completely different person

@thestinger
Copy link
Contributor

@Tobba: Is your git email configured correctly?

let cmp = deflate_bytes(input);
let out = inflate_bytes(cmp.as_slice());
let cmp = match deflate_bytes(input) { Some(data) => data, None => fail!("deflation failed") };
let out = match inflate_bytes(cmp.as_slice()) { Some(data) => data, None => fail!("inflation failed") };
Copy link
Member

Choose a reason for hiding this comment

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

These might be better written as

foo().expect("some string");

@Tobba
Copy link
Contributor Author

Tobba commented Apr 7, 2014

Made those changes and squashed the commits

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 24, 2024
Check that #[deny(allow_attributes)] do not issue spurious messages

Add a new test for rust-lang#13380. This bug was caused by a bug in rustc which has been fixed in rust-lang@6ee87ae.

Close rust-lang#13380

changelog: [`allow_attributes`]: fix spurious warning messages
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.

3 participants