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

The great un-unwrappening #34

Open
boustrophedon opened this issue Jan 28, 2024 · 0 comments
Open

The great un-unwrappening #34

boustrophedon opened this issue Jan 28, 2024 · 0 comments

Comments

@boustrophedon
Copy link
Owner

Since 99% of the time you're just going to call unwrap or expect on the result of enable/apply calls, for the next release I'd like to rename enable to try_enable, etc., and then make enable unwrap the result internally.

The demo in the readme would just look like

    extrasafe::SafetyContext::new()
        .enable(
           extrasafe::builtins::SystemIO::nothing()
              .allow_stdout()
              .allow_stderr()
   	    )
	.apply_to_all_threads();
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

No branches or pull requests

1 participant