summaryrefslogtreecommitdiff
path: root/crates/typst-ide/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-05-13 17:25:43 +0200
committerGitHub <noreply@github.com>2024-05-13 15:25:43 +0000
commit95cd6adf24cb14ede8896fbb0c610432960f4f3a (patch)
treebade59888a5268987eb4fae2dc30ddeaf28ad193 /crates/typst-ide/src
parent7b656b3deb5f05e6e56d666622643a5cde8c435a (diff)
Factor out `typst-utils` crate (#4125)
Diffstat (limited to 'crates/typst-ide/src')
-rw-r--r--crates/typst-ide/src/analyze.rs2
-rw-r--r--crates/typst-ide/src/complete.rs2
-rw-r--r--crates/typst-ide/src/tooltip.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-ide/src/analyze.rs b/crates/typst-ide/src/analyze.rs
index 47214481..748970b8 100644
--- a/crates/typst-ide/src/analyze.rs
+++ b/crates/typst-ide/src/analyze.rs
@@ -110,7 +110,7 @@ pub fn analyze_labels(document: &Document) -> (Vec<(Label, Option<EcoString>)>,
// Bibliography keys.
for (key, detail) in BibliographyElem::keys(document.introspector.track()) {
- output.push((Label::new(&key), detail));
+ output.push((Label::new(key.as_str()), detail));
}
(output, split)
diff --git a/crates/typst-ide/src/complete.rs b/crates/typst-ide/src/complete.rs
index 279e0493..2c4680d1 100644
--- a/crates/typst-ide/src/complete.rs
+++ b/crates/typst-ide/src/complete.rs
@@ -1229,7 +1229,7 @@ impl<'a> CompletionContext<'a> {
/// Add completions for a castable.
fn cast_completions(&mut self, cast: &'a CastInfo) {
// Prevent duplicate completions from appearing.
- if !self.seen_casts.insert(typst::util::hash128(cast)) {
+ if !self.seen_casts.insert(typst::utils::hash128(cast)) {
return;
}
diff --git a/crates/typst-ide/src/tooltip.rs b/crates/typst-ide/src/tooltip.rs
index 3416e5f8..3ecc4d8f 100644
--- a/crates/typst-ide/src/tooltip.rs
+++ b/crates/typst-ide/src/tooltip.rs
@@ -7,7 +7,7 @@ use typst::foundations::{repr, Capturer, CastInfo, Repr, Value};
use typst::layout::Length;
use typst::model::Document;
use typst::syntax::{ast, LinkedNode, Side, Source, SyntaxKind};
-use typst::util::{round_2, Numeric};
+use typst::utils::{round_2, Numeric};
use typst::World;
use crate::analyze::{analyze_expr, analyze_labels};