diff --git a/Cargo.lock b/Cargo.lock index 1ae847c..7535e65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -135,8 +135,8 @@ dependencies = [ ] [[package]] -name = "trait_transformer" -version = "0.1.0" +name = "trait-variant" +version = "0.0.0" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index bad1055..61df904 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/README.md b/README.md index 3af438f..f95a4eb 100644 --- a/README.md +++ b/README.md @@ -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.. diff --git a/trait_transformer/Cargo.toml b/trait-variant/Cargo.toml similarity index 74% rename from trait_transformer/Cargo.toml rename to trait-variant/Cargo.toml index 98a3b71..cc988ad 100644 --- a/trait_transformer/Cargo.toml +++ b/trait-variant/Cargo.toml @@ -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 diff --git a/trait-variant/README.md b/trait-variant/README.md new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/trait-variant/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/trait_transformer/examples/trait_transformer.rs b/trait-variant/examples/trait_transformer.rs similarity index 96% rename from trait_transformer/examples/trait_transformer.rs rename to trait-variant/examples/trait_transformer.rs index 80129a0..619514e 100644 --- a/trait_transformer/examples/trait_transformer.rs +++ b/trait-variant/examples/trait_transformer.rs @@ -11,7 +11,7 @@ use std::iter; -use trait_transformer::trait_transformer; +use trait_variant::trait_transformer; #[trait_transformer(SendIntFactory: Send)] trait IntFactory { diff --git a/trait_transformer/examples/variant.rs b/trait-variant/examples/variant.rs similarity index 95% rename from trait_transformer/examples/variant.rs rename to trait-variant/examples/variant.rs index 43befdd..93c2ebe 100644 --- a/trait_transformer/examples/variant.rs +++ b/trait-variant/examples/variant.rs @@ -8,7 +8,7 @@ use std::future::Future; -use trait_transformer::make_variant; +use trait_variant::make_variant; #[make_variant(SendIntFactory: Send)] trait IntFactory { diff --git a/trait_transformer/src/lib.rs b/trait-variant/src/lib.rs similarity index 94% rename from trait_transformer/src/lib.rs rename to trait-variant/src/lib.rs index e9de850..2694318 100644 --- a/trait_transformer/src/lib.rs +++ b/trait-variant/src/lib.rs @@ -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; diff --git a/trait_transformer/src/transformer.rs b/trait-variant/src/transformer.rs similarity index 100% rename from trait_transformer/src/transformer.rs rename to trait-variant/src/transformer.rs diff --git a/trait_transformer/src/variant.rs b/trait-variant/src/variant.rs similarity index 100% rename from trait_transformer/src/variant.rs rename to trait-variant/src/variant.rs