build: bump typst to 0.11.1 (#301)

This commit is contained in:
Myriad-Dreamin 2024-05-18 12:17:24 +08:00 committed by GitHub
parent 71591b1f08
commit 071d9072e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 384 additions and 341 deletions

View file

@ -420,7 +420,10 @@ pub trait AnalysisResources {
fn resolve(&self, spec: &PackageSpec) -> Result<Arc<Path>, PackageError>;
/// Get all the files in the workspace.
fn iter_dependencies(&self, f: &mut dyn FnMut(&ImmutPath, std::time::SystemTime));
fn iter_dependencies<'a>(
&'a self,
f: &mut dyn FnMut(&'a ImmutPath, FileResult<&std::time::SystemTime>),
);
/// Resolve extra font information.
fn font_info(&self, _font: Font) -> Option<Arc<DataSource>> {

View file

@ -8,9 +8,12 @@ use std::{
use once_cell::sync::Lazy;
pub use serde::Serialize;
use serde_json::{ser::PrettyFormatter, Serializer, Value};
use typst::syntax::{
ast::{self, AstNode},
FileId as TypstFileId, LinkedNode, Source, SyntaxKind, VirtualPath,
use typst::{
diag::FileResult,
syntax::{
ast::{self, AstNode},
FileId as TypstFileId, LinkedNode, Source, SyntaxKind, VirtualPath,
},
};
use typst::{diag::PackageError, foundations::Bytes};
use typst_ts_compiler::{
@ -43,7 +46,10 @@ impl<'a> AnalysisResources for WrapWorld<'a> {
self.0.registry.resolve(spec)
}
fn iter_dependencies(&self, f: &mut dyn FnMut(&reflexo::ImmutPath, typst_ts_compiler::Time)) {
fn iter_dependencies<'b>(
&'b self,
f: &mut dyn FnMut(&'b reflexo::ImmutPath, FileResult<&typst_ts_compiler::Time>),
) {
self.0.iter_dependencies(f)
}
}