Skip to content

Commit

Permalink
Merge pull request #5 from rust-lang/trait-variant
Browse files Browse the repository at this point in the history
Rename crate to trait-variant
  • Loading branch information
tmandry authored Dec 15, 2023
2 parents 2bf8bfa + f79e763 commit 26b9f63
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
[workspace]
members = [
"trait_transformer",
"trait-variant",
]

resolver = "2"

[workspace.package]
license = "MIT OR Apache 2.0"

[workspace.dependencies]
trait_transformer = { version = "0.1.0", path = "trait_transformer" }
repository = "https://github.com/rust-lang/impl-trait-utils"
license = "MIT OR Apache-2.0"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Utilities for working with impl traits in Rust.
`make_variant` generates a specialized version of a base trait that uses `async fn` and/or `-> impl Trait`. For example, if you want a `Send`able version of your trait, you'd write:

```rust
#[trait_transformer::make_variant(SendIntFactory: Send)]
#[trait_variant::make_variant(SendIntFactory: Send)]
trait IntFactory {
async fn make(&self) -> i32;
// ..or..
Expand Down
10 changes: 7 additions & 3 deletions trait_transformer/Cargo.toml → trait-variant/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
# except according to those terms.

[package]
name = "trait_transformer"
version = "0.1.0"
edition = "2021"
name = "trait-variant"
version = "0.0.0"
description = "Utilities for working with impl traits in Rust"
categories = ["asynchronous", "no-std", "rust-patterns"]
keywords = ["async", "trait", "impl"]
license.workspace = true
repository.workspace = true
edition = "2021"

[lib]
proc-macro = true
Expand Down
1 change: 1 addition & 0 deletions trait-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

use std::iter;

use trait_transformer::trait_transformer;
use trait_variant::trait_transformer;

#[trait_transformer(SendIntFactory: Send)]
trait IntFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

use std::future::Future;

use trait_transformer::make_variant;
use trait_variant::make_variant;

#[make_variant(SendIntFactory: Send)]
trait IntFactory {
Expand Down
2 changes: 1 addition & 1 deletion trait_transformer/src/lib.rs → trait-variant/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![doc = include_str!("../../README.md")]
#![doc = include_str!("../README.md")]

mod transformer;
mod variant;
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 26b9f63

Please sign in to comment.