summaryrefslogtreecommitdiff
path: root/src/doc.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2019-02-17 00:08:46 +0100
committerLaurenz <laurmaedje@gmail.com>2019-02-17 00:08:46 +0100
commitc8d3ea89cd5badd796d17e83f2fb292210161227 (patch)
tree9430ef11c944a1fbd5e528015c1e7ac34cb7a2f7 /src/doc.rs
parent6214405766fae4e54ce1c743780019c1b771d3c7 (diff)
Enhance docs (i.a. with examples) 📝
- Complete examples for pdf and opentype crates - Removes allow-unused attributes and fixes their warnings - Various small improvements
Diffstat (limited to 'src/doc.rs')
-rw-r--r--src/doc.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/doc.rs b/src/doc.rs
index 08fd30d8..dcc4ae25 100644
--- a/src/doc.rs
+++ b/src/doc.rs
@@ -1,5 +1,7 @@
//! Generation of abstract documents from syntax trees.
+#![allow(dead_code)]
+
use std::fmt;
use crate::parsing::{SyntaxTree, Node};
@@ -39,7 +41,7 @@ pub struct Text(pub String);
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct Size {
/// The size in typographic points (1/72 inches).
- pub points: f32,
+ points: f32,
}
impl Size {
@@ -112,7 +114,7 @@ type GenResult<T> = std::result::Result<T, GenerationError>;
#[derive(Debug, Clone, Eq, PartialEq)]
pub struct GenerationError {
/// A message describing the error.
- pub message: String,
+ message: String,
}
impl fmt::Display for GenerationError {