From 66030ae5d73d85a0463562230b87f8ec7554c746 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 18 Oct 2022 10:02:52 +0200 Subject: [PATCH] Small fixes --- src/lib.rs | 18 +++++++++--------- src/library/mod.rs | 2 +- src/model/property.rs | 8 ++------ 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index caed7592b..5acb8a907 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -130,13 +130,13 @@ impl Default for Config { /// Definition of certain standard library items the language is aware of. #[derive(Debug, Clone, Hash)] pub struct RoleMap { - strong: fn(Content) -> Content, - emph: fn(Content) -> Content, - raw: fn(EcoString, Option, bool) -> Content, - link: fn(EcoString) -> Content, - ref_: fn(EcoString) -> Content, - heading: fn(NonZeroUsize, Content) -> Content, - list_item: fn(Content) -> Content, - enum_item: fn(Option, Content) -> Content, - desc_item: fn(Content, Content) -> Content, + pub strong: fn(Content) -> Content, + pub emph: fn(Content) -> Content, + pub raw: fn(EcoString, Option, bool) -> Content, + pub link: fn(EcoString) -> Content, + pub ref_: fn(EcoString) -> Content, + pub heading: fn(NonZeroUsize, Content) -> Content, + pub list_item: fn(Content) -> Content, + pub enum_item: fn(Option, Content) -> Content, + pub desc_item: fn(Content, Content) -> Content, } diff --git a/src/library/mod.rs b/src/library/mod.rs index cf9acdac0..1691c8c76 100644 --- a/src/library/mod.rs +++ b/src/library/mod.rs @@ -1,6 +1,6 @@ //! The standard library. //! -//! Call [`new`] to obtain a [`Scope`] containing all standard library +//! Call [`scope`] to obtain a [`Scope`] containing all standard library //! definitions. pub mod graphics; diff --git a/src/model/property.rs b/src/model/property.rs index ed2ab1d05..4b9342ab2 100644 --- a/src/model/property.rs +++ b/src/model/property.rs @@ -133,15 +133,11 @@ impl Debug for KeyId { /// This trait is not intended to be implemented manually, but rather through /// the `#[node]` proc-macro. pub trait Key<'a>: Copy + 'static { - /// The unfolded type which this property is stored as in a style map. For - /// example, this is [`Toggle`](crate::geom::Length) for the - /// [`BOLD`](crate::library::text::TextNode::BOLD) property. + /// The unfolded type which this property is stored as in a style map. type Value: Debug + Clone + Hash + Sync + Send + 'static; /// The folded type of value that is returned when reading this property - /// from a style chain. For example, this is [`bool`] for the - /// [`BOLD`](crate::library::text::TextNode::BOLD) property. For non-copy, - /// non-folding properties this is a reference type. + /// from a style chain. type Output; /// The name of the property, used for debug printing.