From 5ca303ecadff190800dd55a5a5ae224dc28a3920 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 30 Mar 2019 20:51:09 +0100 Subject: =?UTF-8?q?Make=20things=20more=20consistent=20=E2=99=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/engine/mod.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/engine/mod.rs') diff --git a/src/engine/mod.rs b/src/engine/mod.rs index baad9bac..daec2fbb 100644 --- a/src/engine/mod.rs +++ b/src/engine/mod.rs @@ -10,10 +10,10 @@ pub use size::Size; /// The core typesetting engine, transforming an abstract syntax tree into a document. -pub(crate) struct Engine<'a> { +pub struct Engine<'t> { // Immutable - tree: &'a SyntaxTree<'a>, - ctx: &'a Context<'a>, + tree: &'t SyntaxTree<'t>, + ctx: &'t Context<'t>, // Mutable fonts: Vec, @@ -23,22 +23,22 @@ pub(crate) struct Engine<'a> { current_width: Size, } -impl<'a> Engine<'a> { +impl<'t> Engine<'t> { /// Create a new generator from a syntax tree. - pub fn new(tree: &'a SyntaxTree<'a>, context: &'a Context<'a>) -> Engine<'a> { + pub(crate) fn new(tree: &'t SyntaxTree<'t>, context: &'t Context<'t>) -> Engine<'t> { Engine { tree, ctx: context, - fonts: Vec::new(), + fonts: vec![], active_font: 0, - text_commands: Vec::new(), + text_commands: vec![], current_line: String::new(), current_width: Size::zero(), } } /// Generate the abstract document. - pub fn typeset(mut self) -> TypeResult { + pub(crate) fn typeset(mut self) -> TypeResult { // Load font defined by style let mut font = None; let filter = FontFilter::new(&self.ctx.style.font_families); -- cgit v1.2.3