mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
Upgrade to the Rust 2024 edition (#2367)
* Update to rust 2024 edition * Fixes * Clean up imports * Cargo fmt again --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
use crate::raster::bbox::AxisAlignedBbox;
|
||||
use crate::raster::BlendMode;
|
||||
use crate::Color;
|
||||
|
||||
use crate::raster::BlendMode;
|
||||
use crate::raster::bbox::AxisAlignedBbox;
|
||||
use dyn_any::DynAny;
|
||||
|
||||
use glam::DVec2;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use crate::vector::{HandleId, VectorData, VectorDataTable};
|
||||
use crate::Ctx;
|
||||
|
||||
use crate::vector::{HandleId, VectorData, VectorDataTable};
|
||||
use bezier_rs::Subpath;
|
||||
use glam::DVec2;
|
||||
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
pub mod brush_stroke;
|
||||
pub mod generator_nodes;
|
||||
pub mod misc;
|
||||
|
||||
pub mod style;
|
||||
pub use style::PathStyle;
|
||||
|
||||
mod vector_data;
|
||||
pub use vector_data::*;
|
||||
|
||||
mod vector_nodes;
|
||||
pub use vector_nodes::*;
|
||||
|
||||
pub use bezier_rs;
|
||||
pub use style::PathStyle;
|
||||
pub use vector_data::*;
|
||||
pub use vector_nodes::*;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
//! Contains stylistic options for SVG elements.
|
||||
|
||||
use crate::Color;
|
||||
use crate::consts::{LAYER_OUTLINE_STROKE_COLOR, LAYER_OUTLINE_STROKE_WEIGHT};
|
||||
use crate::renderer::format_transform_matrix;
|
||||
use crate::Color;
|
||||
|
||||
use dyn_any::DynAny;
|
||||
|
||||
use glam::{DAffine2, DVec2};
|
||||
use std::fmt::{self, Display, Write};
|
||||
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
mod attributes;
|
||||
mod modification;
|
||||
pub use attributes::*;
|
||||
pub use modification::*;
|
||||
|
||||
use super::style::{PathStyle, Stroke};
|
||||
use crate::instances::Instances;
|
||||
use crate::{AlphaBlending, Color, GraphicGroupTable};
|
||||
|
||||
pub use attributes::*;
|
||||
use bezier_rs::ManipulatorGroup;
|
||||
use dyn_any::DynAny;
|
||||
|
||||
use core::borrow::Borrow;
|
||||
use dyn_any::DynAny;
|
||||
use glam::{DAffine2, DVec2};
|
||||
pub use modification::*;
|
||||
use std::collections::HashMap;
|
||||
|
||||
// TODO: Eventually remove this migration document upgrade code
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
use crate::vector::vector_data::{HandleId, VectorData};
|
||||
|
||||
use dyn_any::DynAny;
|
||||
|
||||
use glam::{DAffine2, DVec2};
|
||||
use std::collections::HashMap;
|
||||
use std::hash::{Hash, Hasher};
|
||||
@@ -218,7 +216,7 @@ impl SegmentDomain {
|
||||
.zip(&self.start_point)
|
||||
.zip(&self.end_point)
|
||||
.filter(|((_, start), end)| **start >= points_length || **end >= points_length)
|
||||
.map(|x| *x.0 .0)
|
||||
.map(|x| *x.0.0)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let can_delete = || {
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
use super::*;
|
||||
use crate::Ctx;
|
||||
use crate::transform::TransformMut;
|
||||
use crate::uuid::generate_uuid;
|
||||
use crate::Ctx;
|
||||
|
||||
use bezier_rs::BezierHandles;
|
||||
use dyn_any::DynAny;
|
||||
|
||||
use core::hash::BuildHasher;
|
||||
use dyn_any::DynAny;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
/// Represents a procedural change to the [`PointDomain`] in [`VectorData`].
|
||||
|
||||
@@ -5,10 +5,9 @@ use crate::instances::{InstanceMut, Instances};
|
||||
use crate::registry::types::{Angle, Fraction, IntegerCount, Length, SeedValue};
|
||||
use crate::renderer::GraphicElementRendered;
|
||||
use crate::transform::{Footprint, Transform, TransformMut};
|
||||
use crate::vector::style::LineJoin;
|
||||
use crate::vector::PointDomain;
|
||||
use crate::vector::style::LineJoin;
|
||||
use crate::{CloneVarArgs, Color, Context, Ctx, ExtractAll, GraphicElement, GraphicGroupTable, OwnedContextImpl};
|
||||
|
||||
use bezier_rs::{Cap, Join, Subpath, SubpathTValue, TValue};
|
||||
use glam::{DAffine2, DVec2};
|
||||
use rand::{Rng, SeedableRng};
|
||||
@@ -1067,9 +1066,7 @@ async fn centroid(ctx: impl Ctx + CloneVarArgs + ExtractAll, vector_data: impl N
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::Node;
|
||||
|
||||
use bezier_rs::Bezier;
|
||||
|
||||
use std::pin::Pin;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
Reference in New Issue
Block a user