Skip to content

Update README with feature=derive #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ Finds the difference between two instances of any data structure.

## Diffus in action
```rust
use diffus_derive::Diffus;
use diffus::{edit, Diffable};
use diffus::{edit, Diffable, Diffus};

#[derive(Diffus)]
struct Point {
Expand Down Expand Up @@ -66,8 +65,7 @@ Strings are considered as collections.
The possible edits of a collection are `Copy`, `Insert`, `Remove`, `Change`.

```rust
use diffus_derive::Diffus;
use diffus::{edit::{self, collection}, Same, Diffable};
use diffus::{edit::{self, collection}, Same, Diffable, Diffus};

#[derive(Diffus, Debug)]
struct Identified {
Expand Down Expand Up @@ -135,8 +133,7 @@ Difference between two enums works as expected, it separates variant changes fro
Possible edits of an enum are `Copy`, `VariantChanged`, `AssociatedChanged`.

```rust
use diffus_derive::Diffus;
use diffus::{edit, Diffable};
use diffus::{edit, Diffable, Diffus};

#[derive(Diffus, Debug, PartialEq)]
enum Test {
Expand Down