duplicate 0.1.0

The attribute macro `duplicate` can duplicate an item with variable substitution.
Documentation

duplicate

Build Status Latest Version Rust Documentation

attribute macro for code duplication with substitution.

This document is meant for contributors to the crate. The documentation is hosted at docs.rs.

Testing

This crate uses macrotest for testing expansion. Therefore, before running tests the nightly compiler must be installed together with rustfmt and cargo-expand:

cargo install cargo-expand
rustup toolchain install nightly
rustup component add rustfmt

The tests can then be run as any other tests:

cargo test

Formatting

We use rustfmt to manage the formatting of this crate's code. To have cargo format the code for you, you must have the nightly compiler installed (but not necessarily the default) and then run the command:

cargo +nightly fmt

Travis-CI will check the formatting and fail if it isn't formatted correctly.

Release Deployment

Deployment of new versions of this crate is managed by Travis-CI using git tags. To trigger a new release, simply push a tag to the repository containing only the version number:

git tag 1.0.0
git push --tags

We do not use the Cargo.toml to manage the versioning of this crate. The version given in it should not be changed! It must remain as 0.0.0 so Travis-CI can correctly change it for every release.

License