summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-11-21 15:20:49 +0100
committerLaurenz <laurmaedje@gmail.com>2023-11-21 15:20:49 +0100
commit36c73016086436eb4cda1c61ab8200cafc38a719 (patch)
tree6e75fd87b66bcce3124f1c721c312f9c88584ab2 /crates
parent1ef6ba7f41b27e963e97e1774eb89d5911fee1d1 (diff)
Tidy up some imports
Diffstat (limited to 'crates')
-rw-r--r--crates/typst-cli/src/update.rs3
-rw-r--r--crates/typst-ide/src/tooltip.rs3
-rw-r--r--crates/typst-library/src/layout/list.rs3
-rw-r--r--crates/typst-library/src/math/mod.rs2
-rw-r--r--crates/typst-library/src/text/linebreak.rs3
-rw-r--r--crates/typst-pdf/src/gradient.rs5
-rw-r--r--crates/typst-syntax/src/source.rs3
-rw-r--r--crates/typst/src/eval/value.rs7
8 files changed, 13 insertions, 16 deletions
diff --git a/crates/typst-cli/src/update.rs b/crates/typst-cli/src/update.rs
index e5896339..c94515b6 100644
--- a/crates/typst-cli/src/update.rs
+++ b/crates/typst-cli/src/update.rs
@@ -6,7 +6,8 @@ use std::path::PathBuf;
use semver::Version;
use serde::Deserialize;
use tempfile::NamedTempFile;
-use typst::{diag::bail, diag::StrResult, eval::eco_format};
+use typst::diag::{bail, StrResult};
+use typst::eval::eco_format;
use xz2::bufread::XzDecoder;
use zip::ZipArchive;
diff --git a/crates/typst-ide/src/tooltip.rs b/crates/typst-ide/src/tooltip.rs
index 87b383d5..d3f040e7 100644
--- a/crates/typst-ide/src/tooltip.rs
+++ b/crates/typst-ide/src/tooltip.rs
@@ -5,8 +5,7 @@ use if_chain::if_chain;
use typst::doc::Frame;
use typst::eval::{repr, CapturesVisitor, CastInfo, Repr, Tracer, Value};
use typst::geom::{round_2, Length, Numeric};
-use typst::syntax::ast;
-use typst::syntax::{LinkedNode, Source, SyntaxKind};
+use typst::syntax::{ast, LinkedNode, Source, SyntaxKind};
use typst::World;
use crate::analyze::analyze_labels;
diff --git a/crates/typst-library/src/layout/list.rs b/crates/typst-library/src/layout/list.rs
index e30aa975..7c089760 100644
--- a/crates/typst-library/src/layout/list.rs
+++ b/crates/typst-library/src/layout/list.rs
@@ -1,5 +1,4 @@
-use crate::layout::GridLayouter;
-use crate::layout::{BlockElem, ParElem, Sizing, Spacing};
+use crate::layout::{BlockElem, GridLayouter, ParElem, Sizing, Spacing};
use crate::prelude::*;
use crate::text::TextElem;
diff --git a/crates/typst-library/src/math/mod.rs b/crates/typst-library/src/math/mod.rs
index 81bdd0fc..7ced638b 100644
--- a/crates/typst-library/src/math/mod.rs
+++ b/crates/typst-library/src/math/mod.rs
@@ -46,9 +46,9 @@ use self::fragment::*;
use self::row::*;
use self::spacing::*;
use crate::layout::{AlignElem, BoxElem, HElem, ParElem, Spacing};
-use crate::meta::Supplement;
use crate::meta::{
Count, Counter, CounterUpdate, LocalNameIn, Numbering, Outlinable, Refable,
+ Supplement,
};
use crate::prelude::*;
use crate::shared::BehavedBuilder;
diff --git a/crates/typst-library/src/text/linebreak.rs b/crates/typst-library/src/text/linebreak.rs
index 5602d9cc..8a69e0a8 100644
--- a/crates/typst-library/src/text/linebreak.rs
+++ b/crates/typst-library/src/text/linebreak.rs
@@ -1,4 +1,5 @@
-use icu_properties::{maps::CodePointMapData, LineBreak};
+use icu_properties::maps::CodePointMapData;
+use icu_properties::LineBreak;
use icu_provider::AsDeserializingBufferProvider;
use icu_provider_adapters::fork::ForkByKeyProvider;
use icu_provider_blob::BlobDataProvider;
diff --git a/crates/typst-pdf/src/gradient.rs b/crates/typst-pdf/src/gradient.rs
index 3d508415..ecb01ee6 100644
--- a/crates/typst-pdf/src/gradient.rs
+++ b/crates/typst-pdf/src/gradient.rs
@@ -2,10 +2,9 @@ use std::f32::consts::{PI, TAU};
use std::sync::Arc;
use ecow::{eco_format, EcoString};
-use pdf_writer::types::FunctionShadingType;
+use pdf_writer::types::{ColorSpaceOperand, FunctionShadingType};
use pdf_writer::writers::StreamShadingType;
-use pdf_writer::{types::ColorSpaceOperand, Name};
-use pdf_writer::{Filter, Finish, Ref};
+use pdf_writer::{Filter, Finish, Name, Ref};
use typst::geom::{
Abs, Angle, Color, ColorSpace, ConicGradient, Gradient, Numeric, Point, Quadrant,
Ratio, Relative, Transform, WeightedColor,
diff --git a/crates/typst-syntax/src/source.rs b/crates/typst-syntax/src/source.rs
index 4bf4045a..3631a2ea 100644
--- a/crates/typst-syntax/src/source.rs
+++ b/crates/typst-syntax/src/source.rs
@@ -8,8 +8,7 @@ use std::sync::Arc;
use comemo::Prehashed;
use crate::reparser::reparse;
-use crate::VirtualPath;
-use crate::{is_newline, parse, FileId, LinkedNode, Span, SyntaxNode};
+use crate::{is_newline, parse, FileId, LinkedNode, Span, SyntaxNode, VirtualPath};
/// A source file.
///
diff --git a/crates/typst/src/eval/value.rs b/crates/typst/src/eval/value.rs
index baf18aa0..b88a293e 100644
--- a/crates/typst/src/eval/value.rs
+++ b/crates/typst/src/eval/value.rs
@@ -12,11 +12,10 @@ use siphasher::sip128::{Hasher128, SipHasher13};
use crate::diag::StrResult;
use crate::eval::{
- fields, ops, repr, Args, Array, AutoValue, Bytes, CastInfo, Content, Dict, Duration,
- FromValue, Func, IntoValue, Module, NativeType, NoneValue, Plugin, Reflect, Repr,
- Scope, Str, Symbol, Type, Version,
+ fields, item, ops, repr, Args, Array, AutoValue, Bytes, CastInfo, Content, Datetime,
+ Dict, Duration, FromValue, Func, IntoValue, Module, NativeType, NoneValue, Plugin,
+ Reflect, Repr, Scope, Str, Symbol, Type, Version,
};
-use crate::eval::{item, Datetime};
use crate::geom::{Abs, Angle, Color, Em, Fr, Gradient, Length, Ratio, Rel};
use crate::model::{Label, Styles};
use crate::syntax::{ast, Span};