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

Validate Safety of minijinja-stack-ref #156

Closed
mitsuhiko opened this issue Nov 20, 2022 · 3 comments
Closed

Validate Safety of minijinja-stack-ref #156

mitsuhiko opened this issue Nov 20, 2022 · 3 comments

Comments

@mitsuhiko
Copy link
Owner

Now that #148 landed the practical limitations (other than excessive uses of Arc all the way down) are really lifetimes. I tried to use the functionality and the main way to find this enjoyable really requires borrowing from data that is already there (eg: on the stack).

I created an API around this which hopefully provides a safe interface to do so in minijinja-stack-ref but it's unclear if this is safe. So I need to check the create for that.

Motivating example

@mitsuhiko
Copy link
Owner Author

cc @SergioBenitez would be curious to hear if this is useful to you btw.

@mitsuhiko
Copy link
Owner Author

Likely the Deref has to go because it lets one hold on to a ref too long. For the use within minijinja that wouldn’t be necessary.

@mitsuhiko
Copy link
Owner Author

This should be safe now by using a with based API internally.

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