Skip to content

Commit

Permalink
Fix doctest errors
Browse files Browse the repository at this point in the history
  • Loading branch information
PoignardAzur committed Dec 22, 2024
1 parent de18c76 commit 5f893aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions parley/src/inputs/style/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ impl<'a> FontFamily<'a> {
/// ```
/// # extern crate alloc;
/// use alloc::borrow::Cow;
/// use parley::inputs::style::FontFamily::{self, *};
/// use parley::inputs::style::GenericFamily::*;
/// use parley::inputs::FontFamily::{self, *};
/// use parley::inputs::GenericFamily::*;
///
/// assert_eq!(FontFamily::parse("Palatino Linotype"), Some(Named(Cow::Borrowed("Palatino Linotype"))));
/// assert_eq!(FontFamily::parse("monospace"), Some(Generic(Monospace)));
Expand All @@ -63,8 +63,8 @@ impl<'a> FontFamily<'a> {
/// ```
/// # extern crate alloc;
/// use alloc::borrow::Cow;
/// use parley::inputs::style::FontFamily::{self, *};
/// use parley::inputs::style::GenericFamily::*;
/// use parley::inputs::FontFamily::{self, *};
/// use parley::inputs::GenericFamily::*;
///
/// let source = "Arial, 'Times New Roman', serif";
///
Expand Down
7 changes: 3 additions & 4 deletions parley/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
//! See the [examples](https://github.com/linebender/parley/tree/main/examples) directory for more complete usage examples that include rendering.
//!
//! ```rust
//! use parley::{
//! Alignment, FontContext, FontWeight, InlineBox, Layout, LayoutContext, PositionedLayoutItem,
//! StyleProperty,
//! };
//! use parley::InlineBox;
//! use parley::inputs::{FontContext, FontWeight, LayoutContext, StyleProperty};
//! use parley::outputs::{Alignment, Layout, PositionedLayoutItem};
//!
//! // Create a FontContext (font database) and LayoutContext (scratch space).
//! // These are both intended to be constructed rarely (perhaps even once per app):
Expand Down

0 comments on commit 5f893aa

Please sign in to comment.