Skip to content

Commit

Permalink
Clean up some imports
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Dec 8, 2024
1 parent f976bf4 commit 0e54031
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 16 deletions.
3 changes: 2 additions & 1 deletion parley/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
//! Context for layout.
use super::context::LayoutContext;
use super::style::{Brush, StyleProperty, TextStyle, WhiteSpaceCollapse};
use super::style::WhiteSpaceCollapse;
use super::FontContext;

use super::layout::Layout;

use alloc::string::String;
use core::ops::RangeBounds;
use styled_text::{Brush, StyleProperty, TextStyle};

use crate::inline_box::InlineBox;

Expand Down
2 changes: 1 addition & 1 deletion parley/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ use self::tree::TreeStyleBuilder;
use super::bidi;
use super::builder::RangedBuilder;
use super::resolve::{tree, RangedStyle, RangedStyleBuilder, ResolveContext, ResolvedStyle};
use super::style::{Brush, TextStyle};
use super::FontContext;

use styled_text::{Brush, TextStyle};
use swash::shape::ShapeContext;
use swash::text::cluster::CharInfo;

Expand Down
2 changes: 1 addition & 1 deletion parley/src/layout/alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

use super::{Alignment, BreakReason, LayoutData};
use crate::style::Brush;
use styled_text::Brush;

pub(crate) fn align<B: Brush>(
layout: &mut LayoutData<B>,
Expand Down
2 changes: 1 addition & 1 deletion parley/src/layout/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

use crate::inline_box::InlineBox;
use crate::layout::{Alignment, Glyph, LineMetrics, RunMetrics, Style};
use crate::style::Brush;
use crate::util::nearly_zero;
use crate::Font;
use core::ops::Range;
use styled_text::Brush;
use swash::shape::Shaper;
use swash::text::cluster::{Boundary, ClusterInfo};
use swash::Synthesis;
Expand Down
5 changes: 3 additions & 2 deletions parley/src/layout/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use crate::{
cursor::{Cursor, Selection},
Affinity, Alignment, Layout,
},
style::Brush,
FontContext, LayoutContext, Rect, StyleProperty, StyleSet,
style::StyleSet,
FontContext, LayoutContext, Rect,
};
use alloc::{borrow::ToOwned, string::String, vec::Vec};
use core::{
Expand All @@ -18,6 +18,7 @@ use core::{
fmt::{Debug, Display},
ops::Range,
};
use styled_text::{Brush, StyleProperty};

#[cfg(feature = "accesskit")]
use crate::layout::LayoutAccessibility;
Expand Down
5 changes: 2 additions & 3 deletions parley/src/layout/line/greedy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//! Greedy line breaking.
use alloc::vec::Vec;
use core::ops::Range;
use styled_text::Brush;
use swash::text::cluster::Whitespace;

#[cfg(feature = "libm")]
Expand All @@ -15,9 +17,6 @@ use crate::layout::{
Alignment, Boundary, BreakReason, Layout, LayoutData, LayoutItem, LayoutItemKind, LineData,
LineItemData, LineMetrics, Run,
};
use crate::style::Brush;

use core::ops::Range;

#[derive(Default)]
struct LineLayout {
Expand Down
2 changes: 1 addition & 1 deletion parley/src/layout/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub mod editor;

use self::alignment::align;

use super::style::Brush;
use crate::{Font, InlineBox};
#[cfg(feature = "accesskit")]
use accesskit::{Node, NodeId, Role, TextDirection, TreeUpdate};
Expand All @@ -28,6 +27,7 @@ use data::{
};
#[cfg(feature = "accesskit")]
use hashbrown::{HashMap, HashSet};
use styled_text::Brush;
use swash::text::cluster::{Boundary, ClusterInfo};
use swash::{GlyphId, NormalizedCoord, Synthesis};

Expand Down
7 changes: 2 additions & 5 deletions parley/src/resolve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ pub(crate) use range::RangedStyleBuilder;

use alloc::{vec, vec::Vec};

use super::style::{
Brush, FontFamily, FontFeature, FontSettings, FontStack, FontStretch, FontStyle, FontVariation,
FontWeight, StyleProperty,
};
use crate::font::FontContext;
use crate::layout;
use crate::style::TextStyle;
use crate::style::{FontFeature, FontStretch, FontStyle, FontVariation, FontWeight};
use crate::util::nearly_eq;
use core::borrow::Borrow;
use core::ops::Range;
use fontique::FamilyId;
use styled_text::{Brush, FontFamily, FontSettings, FontStack, StyleProperty, TextStyle};
use swash::text::Language;

/// Style with an associated range.
Expand Down
3 changes: 2 additions & 1 deletion parley/src/shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

use super::layout::Layout;
use super::resolve::{RangedStyle, ResolveContext, Resolved};
use super::style::{Brush, FontFeature, FontVariation};
use crate::style::{FontFeature, FontVariation};
use crate::util::nearly_eq;
use crate::Font;
use fontique::QueryFamily;
use fontique::{self, Query, QueryFont};
use styled_text::Brush;
use swash::shape::{partition, Direction, ShapeContext};
use swash::text::cluster::{CharCluster, CharInfo, Token};
use swash::text::{Language, Script};
Expand Down

0 comments on commit 0e54031

Please sign in to comment.