From 22e694afcd128a20b93f017ac1c4e7146102e4e8 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 24 Jan 2025 11:43:32 -0600 Subject: [PATCH] test: Drop doc-comment dep --- Cargo.lock | 7 ------- Cargo.toml | 1 - src/lib.rs | 5 ++--- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a483d1e1..a18b7158 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -395,12 +395,6 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "either" version = "1.8.1" @@ -1578,7 +1572,6 @@ dependencies = [ "automod", "circular", "criterion", - "doc-comment", "is-terminal", "lexopt", "memchr", diff --git a/Cargo.toml b/Cargo.toml index de21f822..4c75b688 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -131,7 +131,6 @@ memchr = { version = "2.5", optional = true, default-features = false } terminal_size = { version = "0.4.0", optional = true } [dev-dependencies] -doc-comment = "0.3" proptest = "1.2.0" criterion = "0.5.1" lexopt = "0.3.0" diff --git a/src/lib.rs b/src/lib.rs index 4268a616..f79071fc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -59,11 +59,10 @@ #[cfg_attr(test, macro_use)] #[allow(unused_extern_crates)] extern crate alloc; -#[cfg(doctest)] -extern crate doc_comment; +#[doc = include_str!("../README.md")] #[cfg(doctest)] -doc_comment::doctest!("../README.md"); +pub struct ReadmeDoctests; /// Lib module to re-export everything needed from `std` or `core`/`alloc`. This is how `serde` does /// it, albeit there it is not public.