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

Make functions that return an OutOfMemory error panic #6

Closed
Veykril opened this issue Apr 18, 2019 · 2 comments
Closed

Make functions that return an OutOfMemory error panic #6

Veykril opened this issue Apr 18, 2019 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@Veykril
Copy link
Owner

Veykril commented Apr 18, 2019

Currently almost every method returns a Result even the ones that are infallible internally to stay consistent. A lot of methods actually only return an OutOfMemory error, so panicking on those by default would make it possible to have a slightly better to use api while also sticking to what current Rust does when it encounters OOM situations.

@Veykril Veykril changed the title Panic on OutOfMemory errors? Make functions that return an OutOfMemory panic May 12, 2019
@Veykril Veykril changed the title Make functions that return an OutOfMemory panic Make functions that return an OutOfMemory error panic May 13, 2019
@Veykril Veykril added good first issue Good for newcomers help wanted Extra attention is needed labels May 13, 2019
bors bot added a commit that referenced this issue May 20, 2019
17: api adjustments and oom panics r=Veykril a=Veykril

Progress #6

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
@Veykril
Copy link
Owner Author

Veykril commented May 20, 2019

#17 fixed this in the sense that now all functions that can only return an oom error panic instead. Another change I'd like to see is to figure out what functions may return an oom error and make them panic when they return such an error, ideally allowing us to remove the OutOfMemory variant on the error enum.

@Veykril Veykril removed the good first issue Good for newcomers label May 25, 2019
@Veykril
Copy link
Owner Author

Veykril commented Jun 23, 2019

Fixed in 31b8587

@Veykril Veykril closed this as completed Jun 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant