duplicate icon indicating copy to clipboard operation
duplicate copied to clipboard

Easy code duplicate with substitution for Rust

Results 13 duplicate issues
Sort by recently updated
recently updated
newest added

### Situation: Using `duplicate_item`, it is possible to substitute things in a nested (or lower) `duplicate_item`'s invocation: ```rust #[duplicate::duplicate_item( vals [val; [41]; [42];]; )] #[duplicate::duplicate_item( vals )] impl SomeType for...

D-discussion
I-bug
T-accepted

### Short Description: Release a version 1.0.0 ### Motivation: Releasing a stable version of the crate signals to users that the crate is generally usable and can be depended upon....

D-discussion
I-feature
T-accepted

### Situation: Following global substitutions with a substitutions variable list for short syntax, but not following that with any substitution groups, will successfully compile. Even though current behavior is workable,...

D-accepted
I-bug
T-accepted

### Situation: When trying to use parametric substitution but forgetting to encapsulate the argument to a parametrized identifier in `[]`, the resulting error message is confusing. ### Reproduction: A simple...

D-accepted
I-bug
T-accepted

Find a better example for parameterized substitution in the documentation.

good first issue
I-documentation
T-accepted

Currently we have a feature called `pretty_errors` that is intended to give better error messages than without the feature. This is currently only haphazardly implemented and not automatically tested. We...

I-feature
T-accepted

### Short Description: Enable substitution within string literals. ### Motivation: Substitution within the contents of string literals fits well with the overall functionality of `duplicate`. E.g. it could be used...

D-discussion
I-feature
T-accepted

Inspired by [a reddit comment](https://www.reddit.com/r/rust/comments/11nu27e/comment/jbs82g6/?utm_source=share&utm_medium=web2x&context=3), the `module_disambiguation` should be edited to include the signed integer types and a subtitution for the body.

good first issue
I-documentation
T-accepted

### Short Description: Provide `substitute` and `substitute_item` which only provide the global substitution feature of the main macros. ### Motivation: Sometimes, `duplicate` may be used only to avoid repeating something...

D-accepted
I-feature
T-accepted