mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-26 06:28:11 +08:00
Justify the three clippy lints that must stand
This commit is contained in:
@@ -179,6 +179,8 @@ impl Spawner for WasmSpawner {
|
|||||||
impl NodeRuntime {
|
impl NodeRuntime {
|
||||||
pub fn new(receiver: Receiver<GraphRuntimeRequest>, sender: Sender<NodeGraphUpdate>) -> Self {
|
pub fn new(receiver: Receiver<GraphRuntimeRequest>, sender: Sender<NodeGraphUpdate>) -> Self {
|
||||||
#[cfg(not(target_family = "wasm"))]
|
#[cfg(not(target_family = "wasm"))]
|
||||||
|
// The box is a trait object, so `Box::default()` cannot name the concrete spawner.
|
||||||
|
#[allow(clippy::box_default)]
|
||||||
let spawner: Box<DynSpawner> = Box::new(TokioSpawner::new());
|
let spawner: Box<DynSpawner> = Box::new(TokioSpawner::new());
|
||||||
#[cfg(target_family = "wasm")]
|
#[cfg(target_family = "wasm")]
|
||||||
let spawner: Box<DynSpawner> = Box::new(WasmSpawner);
|
let spawner: Box<DynSpawner> = Box::new(WasmSpawner);
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ use glam::{DAffine2, DVec2};
|
|||||||
use vector_types::GradientStops;
|
use vector_types::GradientStops;
|
||||||
|
|
||||||
/// The outcome of materializing a leveled wire into a group.
|
/// The outcome of materializing a leveled wire into a group.
|
||||||
|
// The group is the render path's success payload; boxing it would add a heap allocation per materialized level.
|
||||||
|
#[allow(clippy::large_enum_variant)]
|
||||||
pub enum LevelGroup<'e> {
|
pub enum LevelGroup<'e> {
|
||||||
Group(Group<'e>, Finality),
|
Group(Group<'e>, Finality),
|
||||||
Pending,
|
Pending,
|
||||||
|
|||||||
@@ -547,6 +547,8 @@ pub(crate) struct ItemShape {
|
|||||||
pub(crate) attrs: Vec<LevelAttr>,
|
pub(crate) attrs: Vec<LevelAttr>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Macro IR built once per node at expansion time, so the variant spread costs nothing at runtime.
|
||||||
|
#[allow(clippy::large_enum_variant)]
|
||||||
pub(crate) enum Element {
|
pub(crate) enum Element {
|
||||||
Concrete(Type),
|
Concrete(Type),
|
||||||
/// Indexes [`Node::generics`].
|
/// Indexes [`Node::generics`].
|
||||||
|
|||||||
Reference in New Issue
Block a user