Skip to content

Commit

Permalink
fix: ignore a few README tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nlopes committed Aug 29, 2023
1 parent 10b4c2d commit c76c803
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ It takes inspiration by the ruby on rails [schema dump].

## Usage

```rust
```rust,ignore
use std::path::PathBuf;
database_schema::generate_without_runtime_using_defaults!();
Expand Down Expand Up @@ -90,23 +90,23 @@ structure of a database at compile time. This is useful for generating the SQL f
database-schema = { version = "0.1", features = ["sqlite", "diesel", "macros"] }
```

```rust
use database_schema::macros::generate_without_runtime;
```rust,ignore
use database_schema::generate_without_runtime;
let sql = generate_without_runtime!("./migrations", "structure.sql");
```

The above is strictly equivalent to calling:

```rust
use database_schema::macros::generate_without_runtime_using_defaults;
```rust,ignore
use database_schema::generate_without_runtime_using_defaults;
let sql = generate_without_runtime!();
```

## Customization

```rust
```rust,ignore
use database_schema::DatabaseSchemaBuilder;
let migrations_path = "db/migrations";
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
#![deny(
missing_copy_implementations,
missing_debug_implementations,
Expand All @@ -11,8 +12,7 @@
unused_results,
variant_size_differences
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(docsrs, doc = include_str!("../README.md"), allow(unused_attributes))]
#![cfg_attr(docsrs, feature(doc_cfg), allow(unused_attributes))]

#[cfg(not(any(feature = "sqlite", feature = "postgres", feature = "mysql"),))]
compile_error!(
Expand Down

0 comments on commit c76c803

Please sign in to comment.