diff --git a/crates/format/src/fig.rs b/crates/format/src/fig.rs index a0b52957c..18696dd25 100644 --- a/crates/format/src/fig.rs +++ b/crates/format/src/fig.rs @@ -70,12 +70,12 @@ pub use export::export; use crate::FormatError; #[cfg(test)] -use craft_fig::{MAX_CANVAS, chunks, network}; -use craft_fig::{Archive, Limits, decode_canvas, embedded_aliases, embedded_copies, kiwi}; -pub(crate) use craft_fig::rest::layer_budget; -#[cfg(test)] use craft_fig::rest::MAX_FIG_NODES; +pub(crate) use craft_fig::rest::layer_budget; +use craft_fig::{Archive, Limits, decode_canvas, embedded_aliases, embedded_copies, kiwi}; pub use craft_fig::{JAM_HEADER, is_fig}; +#[cfg(test)] +use craft_fig::{MAX_CANVAS, chunks, network}; pub(crate) use craft_figma_rest::style_name; /// Largest image member read. diff --git a/crates/format/src/fig/export.rs b/crates/format/src/fig/export.rs index c13cc5530..b3cb2e0d1 100644 --- a/crates/format/src/fig/export.rs +++ b/crates/format/src/fig/export.rs @@ -32,9 +32,9 @@ use figcraft_doc::{ use serde_json::Value; use sha1::Digest; +use crate::FormatError; use craft_fig::kiwi::{Kv, Schema, encode}; use craft_fig::{network, path}; -use crate::FormatError; mod assets; mod common; diff --git a/crates/format/src/fig/export/component.rs b/crates/format/src/fig/export/component.rs index 8e267ea05..416a99610 100644 --- a/crates/format/src/fig/export/component.rs +++ b/crates/format/src/fig/export/component.rs @@ -1,9 +1,9 @@ -use super::{MAX_SCALE_FACTOR, MIN_SCALE_FACTOR}; use super::common::{ bool_data, changed, layout_grid, prop_type, resolved_alike, scaled, sort_position, symbol_data, text_data, text_value, var_data, variant_pairs, }; use super::scale::main_equal_lengths; use super::{AUX, BTreeMap, Bound, Exporter, Fields, Kv, MAX_NODES, Node, NodeId, NodeKind, PropDef, StyleKind, Value, arr, b, e, fl, guid, o, s}; +use super::{MAX_SCALE_FACTOR, MIN_SCALE_FACTOR}; /// A changed effect/grid style, and a payload only when it differs from that style's values. struct ListStyleOverride { diff --git a/crates/format/src/rest.rs b/crates/format/src/rest.rs index 3c3030d3e..13e632607 100644 --- a/crates/format/src/rest.rs +++ b/crates/format/src/rest.rs @@ -67,12 +67,12 @@ pub(crate) use craft_fig::rest::{FIG_CAPPED_MAINS_FIELD, FIG_LIBRARY_CONTEXTS_FI const MAX_PATH_BYTES: usize = 4 << 20; /// Most path elements in one vector. const MAX_PATH_ELEMENTS: usize = 200_000; +#[cfg(test)] +pub(crate) use craft_figma_rest::MAX_WARNINGS; /// Distinct warnings in first-seen order, with repeat counts (at most 200). The /// import report reads the `(×n)` suffix off before it looks the note up in the catalogue, so a /// counted note is still translated (`ui-egui`'s `note_text`). pub(crate) use craft_figma_rest::Warnings; -#[cfg(test)] -pub(crate) use craft_figma_rest::MAX_WARNINGS; /// Most shared style definitions read. const MAX_STYLES: usize = 10_000; /// Image key used for image fills without an `imageRef`.