Skip to content

Commit 2a9f19d

Browse files
authored
Merge pull request #54 from thedodd/53-pub-dep-async-trait
Add async_trait macro as a pub export for codegen.
2 parents 90af168 + 388350b commit 2a9f19d

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ changelog
99

1010
### removed
1111

12+
## 0.9.0-alpha.1
13+
14+
### added
15+
- Adding `async_trait::async_trait` macro as a pub export of the `wither` crate, so that code generated from `wither_derive` can use `#[wither::async_trait]` instead of requiring users to declare `async-trait` as a dependency. This _seems_ like the right thing to do here ... we'll see. If this causes problems for you (which it shouldn't), please open an issue.
16+
1217
## 0.9.0-alpha.0
1318

1419
### added

Cargo.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wither/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ license = "Apache-2.0"
99
name = "wither"
1010
readme = "../README.md"
1111
repository = "https://github.com/thedodd/wither"
12-
version = "0.9.0-alpha.0"
12+
version = "0.9.0-alpha.1"
1313
edition = "2018"
1414

1515
[dependencies]
1616
chrono = "0.4"
1717
log = "0.4"
1818
mongodb = { version = "1", default-features=false }
1919
serde = { version = "1", features=["derive"] }
20-
wither_derive = { version = "0.9.0-alpha.0", path = "../wither_derive", default-features = false }
20+
wither_derive = { version = "0.9.0-alpha.1", path = "../wither_derive", default-features = false }
2121
async-trait = "0.1.33"
2222
futures = "0.3.5"
2323
thiserror = "1.0.19"

wither/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![cfg_attr(feature="docinclude", doc(include="../README.md"))]
33

44
// Re-exports //
5+
pub use async_trait::async_trait;
56
pub use mongodb;
67
pub use mongodb::bson;
78

wither_derive/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "Apache-2.0"
99
name = "wither_derive"
1010
readme = "README.md"
1111
repository = "https://github.com/thedodd/wither"
12-
version = "0.9.0-alpha.0"
12+
version = "0.9.0-alpha.1"
1313
edition = "2018"
1414

1515
[lib]

wither_derive/src/model.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<'a> MetaModel<'a> {
7777
let selection_criteria = OptionSelectionCriteria(&self.selection_criteria);
7878
let indexes = &self.indexes;
7979
quote! {
80-
#[async_trait::async_trait]
80+
#[wither::async_trait]
8181
impl wither::Model for #name {
8282
const COLLECTION_NAME: &'static str = #collection_name;
8383

0 commit comments

Comments
 (0)