diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-05-25 11:16:03 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-05-25 11:16:03 +0200 |
| commit | 3309ff9fe5ea36134e8ddf11ac2c84613b569856 (patch) | |
| tree | b3eb48d444a5dee7273a76c548a64be96d76f0b9 /tests | |
| parent | 362a7f2a8ac76f944efa05eabcab0960817777c5 (diff) | |
Slim down context
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typeset.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index b0452163..caa30d7e 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -19,7 +19,7 @@ use typst::loading::FsLoader; use typst::model::StyleMap; use typst::source::SourceFile; use typst::syntax::Span; -use typst::{bail, Context}; +use typst::{bail, Config, Context}; const TYP_DIR: &str = "./typ"; const REF_DIR: &str = "./ref"; @@ -84,8 +84,9 @@ fn main() { }); // Create loader and context. - let loader = FsLoader::new().with_path(FONT_DIR).wrap(); - let mut ctx = Context::builder().std(std).styles(styles).build(loader); + let loader = FsLoader::new().with_path(FONT_DIR); + let config = Config::builder().std(std).styles(styles).build(); + let mut ctx = Context::new(Arc::new(loader), config); // Run all the tests. let mut ok = 0; |
