aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-20 07:29:48 +0100
committerMartin Fischer <martin@push-f.com>2021-11-20 07:29:48 +0100
commit8d4c194edf32a0b94bf4eaaa562806e86cfc0d74 (patch)
tree6900e766ca9eecbf6ae11924242ae811ccdc4d32
parentd9e1b4e560d93c4245d6ffe41d4970724ede4f43 (diff)
ignore README examples via code block attributes
-rw-r--r--Cargo.toml1
-rw-r--r--README.md10
2 files changed, 5 insertions, 6 deletions
diff --git a/Cargo.toml b/Cargo.toml
index f39ac1e..56c0f4c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,6 @@ edition = "2021"
[lib]
proc-macro = true
-doctest = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/README.md b/README.md
index 972f82c..e6c715e 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ In order for a trait to be usable as a trait object it needs to fulfill
[several requirements](https://doc.rust-lang.org/reference/items/traits.html#object-safety).
For example:
-```rust
+```rust ignore
trait Client {
type Error;
@@ -28,7 +28,7 @@ implementations with different associated type values. This crate provides an
attribute macro to achieve that. To use dynamize you only have to make some
small changes:
-```rust
+```rust ignore
#[dynamize::dynamize]
trait Client {
type Error: Into<SuperError>;
@@ -52,7 +52,7 @@ type.
For the above example dynamize generates the following code:
-```rust
+```rust ignore
trait DynClient {
fn get(&self, url: String) -> Result<Vec<u8>, SuperError>;
}
@@ -92,7 +92,7 @@ Dynamize supports async out of the box. Since Rust however does not yet support
async functions in traits, you'll have to additionally use another library like
[async-trait](https://crates.io/crates/async-trait), for example:
-```rust
+```rust ignore
#[dynamize::dynamize]
#[dyn_trait_attr(async_trait)]
#[blanket_impl_attr(async_trait)]
@@ -114,7 +114,7 @@ attribute.
The following also just works:
-```rust
+```rust ignore
#[dynamize::dynamize]
trait TraitWithCallback {
type A: SomeTrait;