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

str::from_bytes should return a Result instead of fail on invalid input. #4765

Closed
carllerche opened this issue Feb 2, 2013 · 4 comments
Closed
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@carllerche
Copy link
Member

It seems to me that returning a Result would be more appropriate than failing.

https://github.com/mozilla/rust/blob/incoming/src/libcore/str.rs#L50

@catamorphism
Copy link
Contributor

See discussion on #1945 -- the right thing to do here would be to use conditions, I think.

@catamorphism
Copy link
Contributor

This should be pretty simple -- working on it.

@catamorphism
Copy link
Contributor

Fixed pending #6920

catamorphism added a commit to catamorphism/rust that referenced this issue Jun 8, 2013
bors added a commit that referenced this issue Jun 8, 2013
@catamorphism
Copy link
Contributor

3fc0524 fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants