mirror of
https://github.com/typst/typst
synced 2025-08-01 00:37:55 +08:00
Try 33e6bf6
This commit is contained in:
parent
6c28ef34c7
commit
2862d61944
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -451,7 +451,7 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
|
||||
[[package]]
|
||||
name = "comemo"
|
||||
version = "0.4.0"
|
||||
source = "git+https://github.com/typst/comemo?rev=418f02b#418f02b58ce10e09abf0bcba92437e05f284294f"
|
||||
source = "git+https://github.com/typst/comemo?rev=33e6bf6#33e6bf67f0867c3c83c432dfaf210869121a01e1"
|
||||
dependencies = [
|
||||
"comemo-macros",
|
||||
"parking_lot",
|
||||
@ -462,7 +462,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "comemo-macros"
|
||||
version = "0.4.0"
|
||||
source = "git+https://github.com/typst/comemo?rev=418f02b#418f02b58ce10e09abf0bcba92437e05f284294f"
|
||||
source = "git+https://github.com/typst/comemo?rev=33e6bf6#33e6bf67f0867c3c83c432dfaf210869121a01e1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -165,4 +165,4 @@ uninlined_format_args = "warn"
|
||||
wildcard_in_or_patterns = "allow"
|
||||
|
||||
[patch.crates-io]
|
||||
comemo = { git = "https://github.com/typst/comemo", rev = "418f02b" }
|
||||
comemo = { git = "https://github.com/typst/comemo", rev = "33e6bf6" }
|
||||
|
@ -39,7 +39,7 @@ pub use typst_syntax as syntax;
|
||||
pub use typst_utils as utils;
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::sync::{LazyLock, Mutex};
|
||||
use std::sync::LazyLock;
|
||||
|
||||
use comemo::{Track, Tracked};
|
||||
use ecow::{EcoString, EcoVec, eco_format, eco_vec};
|
||||
@ -135,11 +135,10 @@ fn compile_impl<D: Document>(
|
||||
|
||||
subsink = Sink::new();
|
||||
|
||||
let constraint = Mutex::new(comemo::Constraint::new());
|
||||
let push = |call, ret| constraint.lock().unwrap().push(call, ret);
|
||||
let constraint = comemo::Constraint::new();
|
||||
let mut engine = Engine {
|
||||
world,
|
||||
introspector: introspector.track_with(&push),
|
||||
introspector: introspector.track_with(&constraint),
|
||||
traced,
|
||||
sink: subsink.track_mut(),
|
||||
route: Route::default(),
|
||||
@ -151,10 +150,7 @@ fn compile_impl<D: Document>(
|
||||
introspector = document.introspector();
|
||||
iter += 1;
|
||||
|
||||
if timed!(
|
||||
"check stabilized",
|
||||
constraint.into_inner().unwrap().validate(introspector)
|
||||
) {
|
||||
if timed!("check stabilized", constraint.validate(introspector)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user