mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 14:58:05 +08:00
Fix tests
This commit is contained in:
@@ -93,9 +93,12 @@ where
|
||||
|
||||
drop(cache_guard);
|
||||
|
||||
let fut = self.node.eval(input);
|
||||
let cache = self.cache.clone();
|
||||
|
||||
Box::pin(async move {
|
||||
let value = self.node.eval(input).await;
|
||||
*self.cache.lock().unwrap() = Some((hash, Arc::new(value.clone())));
|
||||
let value = fut.await;
|
||||
*cache.lock().unwrap() = Some((hash, Arc::new(value.clone())));
|
||||
value
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
use crate::instances::{InstanceRef, Instances};
|
||||
use crate::raster_types::{CPU, RasterDataTable};
|
||||
use crate::vector::VectorDataTable;
|
||||
use crate::{ Context, Ctx, ExtractIndex, ExtractVarArgs, GraphicElement, GraphicGroupTable, WithIndex};
|
||||
use crate::{Context, Ctx, ExtractIndex, ExtractVarArgs, GraphicElement, GraphicGroupTable, WithIndex};
|
||||
use glam::DVec2;
|
||||
|
||||
#[node_macro::node(name("Instance on Points"), category("Instancing"), path(graphene_core::vector))]
|
||||
async fn instance_on_points<T: Into<GraphicElement> + Default + Send + Clone + 'static>(
|
||||
ctx: impl Ctx + WithIndex,
|
||||
ctx: impl Ctx + WithIndex + Sync,
|
||||
points: VectorDataTable,
|
||||
#[implementations(
|
||||
Context -> GraphicGroupTable,
|
||||
|
||||
Reference in New Issue
Block a user