-
Notifications
You must be signed in to change notification settings - Fork 1
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
What's the point of SkimItem
s with non-static lifetime?
#13
Comments
I believe the idea was to reduce memory usage after a One idea was to rip out all static lifetimes everywhere in I suppose strict API compatibility is/was not a goal of mine and downcast was not a feature I was especially interested in or used. So -- you're not collaborating with a Rust genius (or even a professional programmer!). I took a hacksaw to |
I see that httm only implements |
Yeah, that'd be great. Give it a shot. My feeling re: any Dozens of things are more important to me, ... like competing with
When I say I'm only interested in |
Okay. I can also add something like this, as a fallback: #[derive(Clone)]
struct DynamicSkimItem(pub Arc<dyn SkimItem>);
impl DynamicSkimItem {
pub fn new(item: impl 'static + SkimItem) -> Self {
Self(Arc::new(item))
}
}
impl SkimItem for DynamicSkimItem {
...
} |
Wait - does Skim clone it alot? I assume it does - otherwise it'd use |
It needs to be an See: https://github.com/kimono-koans/two_percent/blob/vendored/src/helper/ingest.rs |
I'm going to have to remove this method: Lines 73 to 75 in 9d50cad
This mostly means that places that treated released data as empty strings will need to change. I don't think the behavior itself is going to change much, because this was already kind of an error... |
Ran into a problem. The two_percent/src/helper/ingest.rs Lines 95 to 127 in 9649247
This is not something I can make generic, because that will require any implementation of I may have to settler for restoring |
Fix #13 - make `SkimItem` `AsAny + 'static` again
Originally posted by @idanarye in #11 (comment)
The text was updated successfully, but these errors were encountered: