Cargo fmt

This commit is contained in:
Dennis Kobert
2026-08-25 11:17:17 +00:00
parent bb3643541d
commit 34e03038df
3 changed files with 4 additions and 10 deletions

View File

@@ -15,8 +15,6 @@ use core_types::transform::Footprint;
#[cfg(target_family = "wasm")]
use core_types::{ATTR_TRANSFORM, WasmNotSend};
use core_types::{Color, Ctx};
#[cfg(target_family = "wasm")]
use graphic_types::ATTR_EDITOR_MERGED_LAYERS;
pub use graph_craft::application_io::resource::{Resource, ResourceHash};
pub use graph_craft::application_io::*;
pub use graph_craft::document::value::RenderOutputType;
@@ -25,6 +23,8 @@ pub use graphene_canvas_utils as canvas_utils;
#[cfg(target_family = "wasm")]
use graphic_types::ATTR_EDITOR_MERGED_LAYERS;
#[cfg(target_family = "wasm")]
use graphic_types::ATTR_EDITOR_MERGED_LAYERS;
#[cfg(target_family = "wasm")]
use graphic_types::Graphic;
#[cfg(target_family = "wasm")]
use graphic_types::IntoGraphicList;

View File

@@ -97,10 +97,7 @@ fn replace_transform<T>(_: impl Ctx + InjectFootprint, (element, _content_transf
// TODO: Figure out how this node should behave once #2982 is implemented.
/// Obtains the transform of the first lane of the input wire, if present.
#[node_macro::node(category("Math: Transform"), path(core_types::vector))]
fn extract_transform<T: Clone + Send + Sync + CacheHash + 'static>(
_: impl Ctx,
#[implementations(Graphic, Vector, Raster<CPU>, Raster<GPU>, Color, GradientStops)] content: IList<T>,
) -> DAffine2 {
fn extract_transform<T: Clone + Send + Sync + CacheHash + 'static>(_: impl Ctx, #[implementations(Graphic, Vector, Raster<CPU>, Raster<GPU>, Color, GradientStops)] content: IList<T>) -> DAffine2 {
match content.len() {
0 => DAffine2::default(),
_ => content.lane(0).attr::<TransformAttr>(),

View File

@@ -3594,10 +3594,7 @@ fn point_inside(_: impl Ctx, source: IList<Vector>, point: DVec2) -> bool {
// TODO: Return u32, u64, or usize instead of f64 after #1621 is resolved and has allowed us to implement automatic type conversion in the node graph for nodes with generic type inputs.
// TODO: (Currently automatic type conversion only works for concrete types, via the Graphene preprocessor and not the full Graphene type system.)
#[node_macro::node(category("General"), path(graphene_core::vector))]
fn count_elements<T: Clone + Send + Sync + CacheHash + 'static>(
_: impl Ctx,
#[implementations(Graphic, Artboard, Vector, Raster<CPU>, Color, GradientStops, String)] content: IList<T>,
) -> f64 {
fn count_elements<T: Clone + Send + Sync + CacheHash + 'static>(_: impl Ctx, #[implementations(Graphic, Artboard, Vector, Raster<CPU>, Color, GradientStops, String)] content: IList<T>) -> f64 {
content.len() as f64
}