diff options
| author | Martin <mhaug@live.de> | 2022-01-01 12:56:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-01 12:56:03 +0100 |
| commit | 28fc2893e873d44aa31a64a87cb3e2e975977a70 (patch) | |
| tree | bad022650bb488492386e4fc079dde3807b89304 /src/lib.rs | |
| parent | 5d5d8a21cfc041ab08d30229f4ecb4cbb415cbc5 (diff) | |
| parent | 179a9f479831c4941253c0517fccdec3acd8f2ff (diff) | |
Merge pull request #53 from typst/style-chains
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -55,7 +55,7 @@ pub mod syntax; use std::rc::Rc; use crate::diag::TypResult; -use crate::eval::{Eval, EvalContext, Module, Scope, Styles}; +use crate::eval::{Eval, EvalContext, Module, Scope, StyleMap}; use crate::font::FontStore; use crate::frame::Frame; use crate::image::ImageStore; @@ -80,7 +80,7 @@ pub struct Context { /// The standard library scope. std: Scope, /// The default styles. - styles: Styles, + styles: StyleMap, } impl Context { @@ -100,7 +100,7 @@ impl Context { } /// A read-only reference to the styles. - pub fn styles(&self) -> &Styles { + pub fn styles(&self) -> &StyleMap { &self.styles } @@ -140,7 +140,7 @@ impl Context { /// This struct is created by [`Context::builder`]. pub struct ContextBuilder { std: Option<Scope>, - styles: Option<Styles>, + styles: Option<StyleMap>, #[cfg(feature = "layout-cache")] policy: EvictionPolicy, #[cfg(feature = "layout-cache")] @@ -156,7 +156,7 @@ impl ContextBuilder { } /// The default properties for page size, font selection and so on. - pub fn styles(mut self, styles: Styles) -> Self { + pub fn styles(mut self, styles: StyleMap) -> Self { self.styles = Some(styles); self } |
