-
Notifications
You must be signed in to change notification settings - Fork 281
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
[BUG] 'static lifetime requirement for AreaSeries #62
Comments
Details: Preivously, we put too many lifetime bound on the dynamic elements, which pollute the lifetime makes unncessary constraints. This fix bug #62.
Hi @JakeOShannessy , Thanks for reporting this. Close it for now and feel free to reopen it if needed. Cheers, |
All fixed, thanks for the quick response. |
Hi, it seems this issue has returned. When using dynamic elements (for example by calling .to_dyn() on the elements you're drawing) the `static requirement returns. I noticed because the path parameter in the ::new call to the backend needed to be a reference with `static lifetime. |
Describe the bug
When using
AreaSeries
the backend is required to be'static
, e.g.BitmapBackend<'static>
. This has a number of limitations, the simplest of which is that a filename passed to the backend must have a static lifetime. This is not the case with other series such asLineSeries
. It seemsAreaSeries
takes a reference to the backend while others do not.To Reproduce
I modified the area chart example from:
to:
After doing this the example would no longer compile. This reproduces my problem exactly.
Version Information
Both
master
and 0.2.9.The text was updated successfully, but these errors were encountered: