mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 10:48:13 +08:00
Sample Points node: employ caching and deduplication (#1546)
Sample Points node: split out expensive computation so it can be deduped
This commit is contained in:
@@ -19,7 +19,7 @@ where
|
||||
for<'a> <CachedNode as Node<'a, ()>>::Output: core::future::Future<Output = T> + 'a,
|
||||
{
|
||||
// TODO: This should return a reference to the cached cached_value
|
||||
// but that requires a lot of lifetime magic <- This was suggested by copilot but is pretty acurate xD
|
||||
// but that requires a lot of lifetime magic <- This was suggested by copilot but is pretty accurate xD
|
||||
type Output = Pin<Box<dyn Future<Output = T> + 'i>>;
|
||||
fn eval(&'i self, input: ()) -> Pin<Box<dyn Future<Output = T> + 'i>> {
|
||||
Box::pin(async move {
|
||||
|
||||
Reference in New Issue
Block a user