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 )]