Skip to content

Commit

Permalink
Fix readme ordering. Re-release
Browse files Browse the repository at this point in the history
  • Loading branch information
BrynCooke committed Jul 31, 2022
1 parent beddb2b commit 21da936
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "buildstructor"
version = "0.4.0"
version = "0.4.1"
edition = "2021"
authors = ["Bryn Cooke <[email protected]>"]
license = "Apache-2.0"
Expand Down
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,6 @@ This is useful for Strings, but also other types where you want to overload the

There had to be some magic somewhere.

## Upgrade to 0.2.0

To provide more control over generated builders and allow builders for methods with receivers the top level annotation has changed:

`#[buildstructor::builder]` => `#[buildstructor::buildstructor]`

1. Annotate the impl with: `#[buildstructor::buildstructor]`
2. Annotate methods to create a builders for with: `#[builder]`

### Visibility

Builders will automatically inherit the visibility of the method that they are decorating. However, if you want to override this then you can use the visibility.
Expand Down Expand Up @@ -390,6 +381,17 @@ fn main() {
}
```


## Upgrade to 0.2.0

To provide more control over generated builders and allow builders for methods with receivers the top level annotation has changed:

`#[buildstructor::builder]` => `#[buildstructor::buildstructor]`

1. Annotate the impl with: `#[buildstructor::buildstructor]`
2. Annotate methods to create a builders for with: `#[builder]`


## TODO
* Better error messages.
* More testing.
Expand Down

0 comments on commit 21da936

Please sign in to comment.