From 831f05de5b8d47b13753678919242f94c34778f9 Mon Sep 17 00:00:00 2001 From: bendn Date: Sat, 28 Oct 2023 07:32:34 +0700 Subject: [PATCH] doc auto cfg --- Cargo.toml | 3 +++ src/drawing/text.rs | 4 ++-- src/lib.rs | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f21479a..add8cb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,3 +48,6 @@ debug = 2 opt-level = 3 lto = "thin" incremental = true + +[package.metadata.docs.rs] +all-features = true diff --git a/src/drawing/text.rs b/src/drawing/text.rs index 7c9cf27..3a8502f 100644 --- a/src/drawing/text.rs +++ b/src/drawing/text.rs @@ -10,7 +10,7 @@ impl + AsRef<[u8]>> Image { /// ``` /// # use fimg::Image; /// let font = fontdue::Font::from_bytes( - /// &include_bytes!("../../tdata/CascadiaCode.ttf")[..], + /// &include_bytes!("../../tdata/CascadiaCode.ttf")[..], /// fontdue::FontSettings { /// scale: 200.0, /// ..Default::default() @@ -18,7 +18,7 @@ impl + AsRef<[u8]>> Image { /// ).unwrap(); /// let mut i: Image<_, 4> = Image::alloc(750, 250).boxed(); /// i.text(50, 10, 200.0, &font, "hello", [0, 0, 0, 255]); - /// assert_eq!(i.buffer(), include_bytes!("../../tdata/text.imgbuf")); + /// # assert_eq!(i.buffer(), include_bytes!("../../tdata/text.imgbuf")); /// ``` pub fn text(&mut self, x: u32, y: u32, size: f32, font: &Font, text: &str, color: [u8; 4]) { let mut lay = diff --git a/src/lib.rs b/src/lib.rs index 56fd2a9..fac8791 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,6 +9,7 @@ slice_flatten, portable_simd, array_windows, + doc_auto_cfg, const_option, array_chunks )]