diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-04 19:57:39 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-04 19:57:39 +0200 |
| commit | c1dd872b34507a9f45b39a8a6ac70606b642a19d (patch) | |
| tree | e3afa36228321f7b0680d8c989818f306b80d43e /src/lib.rs | |
| parent | 105f70867ddcb2c73860bf0c55f1380eda2437ca (diff) | |
Remove unncessary wrappers and typedefs 🛑
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -43,9 +43,9 @@ use std::future::Future; use std::pin::Pin; use crate::diagnostic::Diagnostic; -use crate::eval::{State, Value}; +use crate::eval::State; use crate::font::SharedFontLoader; -use crate::layout::{Commands, MultiLayout}; +use crate::layout::BoxLayout; use crate::syntax::{Decoration, Offset, Pos, SpanVec}; /// Process source code directly into a collection of layouts. @@ -53,7 +53,7 @@ pub async fn typeset( src: &str, state: State, loader: SharedFontLoader, -) -> Pass<MultiLayout> { +) -> Pass<Vec<BoxLayout>> { let parsed = parse::parse(src); let layouted = layout::layout(&parsed.output, state, loader).await; let feedback = Feedback::merge(parsed.feedback, layouted.feedback); @@ -93,13 +93,6 @@ impl<T> Pass<T> { } } -impl Pass<Value> { - /// Create a new pass with a list of layouting commands. - pub fn commands(commands: Commands, feedback: Feedback) -> Self { - Pass::new(Value::Commands(commands), feedback) - } -} - /// Diagnostic and semantic syntax highlighting data. #[derive(Debug, Default, Clone, Eq, PartialEq)] pub struct Feedback { |
