Skip to content

Commit

Permalink
Disable doctests for derive code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
GREsau committed Aug 21, 2024
1 parent ed24b8f commit a4fd491
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/_includes/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ Set the path to the schemars crate instance the generated code should depend on.

Sets properties specified by [validator attributes](#supported-validator-attributes) on items of an array schema. For example:

```rs
```rust,compile_fail
struct Struct {
#[schemars(inner(url, regex(pattern = "^https://")))]
urls: Vec<String>,
Expand Down Expand Up @@ -329,7 +329,7 @@ Set on a container, variant or field to run a `schemars::transform::Transform` a

The `Transform` trait is implemented on functions with the signature `fn(&mut Schema) -> ()`, allowing you to do this:

```rust
```rust,compile_fail
fn my_transform(schema: &mut Schema) {
todo!()
}
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/deriving.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The most important trait in Schemars is `JsonSchema`, and the most important fun

Usually, all you need to do to use it is to add a `#[derive(JsonSchema)]` attribute to your type:

```rust
```rust,compile_fail
use schemars::{JsonSchema, schema_for};
#[derive(JsonSchema, Debug)]
Expand Down

0 comments on commit a4fd491

Please sign in to comment.