From c8d3ea89cd5badd796d17e83f2fb292210161227 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 17 Feb 2019 00:08:46 +0100 Subject: =?UTF-8?q?Enhance=20docs=20(i.a.=20with=20examples)=20?= =?UTF-8?q?=F0=9F=93=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Complete examples for pdf and opentype crates - Removes allow-unused attributes and fixes their warnings - Various small improvements --- src/doc.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/doc.rs') 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 = std::result::Result; #[derive(Debug, Clone, Eq, PartialEq)] pub struct GenerationError { /// A message describing the error. - pub message: String, + message: String, } impl fmt::Display for GenerationError { -- cgit v1.2.3