mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 13:30:48 +00:00
Code cleanup and refactoring to enhance consistency (#1695)
- Move message handler payload data into structs - Organize the file structure used by `editor/src/messages/portfolio/document` `/node_graph` and `/graph_operation` - Make derive attributes use `serde::Serialize, serde::Deserialize` consistently instead of `use serde::{Deserialize, Serialize};` imports - Various other code cleanup and refactoring
This commit is contained in:
parent
ed3f7acdd7
commit
0a9bd41be1
134 changed files with 1860 additions and 1865 deletions
|
@ -208,6 +208,7 @@ impl Bezier {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_evaluate() {
|
||||
let p1 = DVec2::new(3., 5.);
|
||||
|
|
|
@ -120,11 +120,10 @@ impl<ManipulatorGroupId: crate::Identifier> Subpath<ManipulatorGroupId> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::consts::MAX_ABSOLUTE_DIFFERENCE;
|
||||
use crate::utils::f64_compare;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn length_quadratic() {
|
||||
let start = DVec2::new(20., 30.);
|
||||
|
|
|
@ -121,9 +121,9 @@ impl<ManipulatorGroupId: crate::Identifier> Subpath<ManipulatorGroupId> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::utils::SubpathTValue;
|
||||
|
||||
use super::*;
|
||||
use glam::DVec2;
|
||||
|
||||
fn set_up_open_subpath() -> Subpath<EmptyId> {
|
||||
|
|
|
@ -417,11 +417,11 @@ impl<ManipulatorGroupId: crate::Identifier> Subpath<ManipulatorGroupId> {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::Bezier;
|
||||
use glam::DVec2;
|
||||
|
||||
use crate::consts::MAX_ABSOLUTE_DIFFERENCE;
|
||||
use crate::utils;
|
||||
use crate::Bezier;
|
||||
|
||||
use glam::DVec2;
|
||||
|
||||
fn normalize_t(n: i64, t: f64) -> f64 {
|
||||
t * (n as f64) % 1.
|
||||
|
|
|
@ -168,7 +168,9 @@ macro_rules! impl_slice {
|
|||
|
||||
mod slice {
|
||||
use super::*;
|
||||
|
||||
use core::slice::*;
|
||||
|
||||
impl_slice!(Iter, IterMut, Chunks, ChunksMut, RChunks, RChunksMut, Windows);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue