Crates.io | todo_using |
lib.rs | todo_using |
version | 0.2.2 |
source | src |
created_at | 2022-09-03 21:32:42.184616 |
updated_at | 2022-09-03 21:40:13.300494 |
description | A super small crate only exporting a single macro to "use" parameters. |
homepage | |
repository | https://github.com/9SMTM6/todo_using |
max_upload_size | |
id | 658055 |
size | 7,539 |
A super small crate only exporting a single macro-by-example to "use" parameters.
If you want to avoid yet another dependency, and don't need a fancy API, you can also just copy paste:
#[macro_export]
macro_rules! todo_using {
([$($using_ident: ident),* $(,)?], $($message_arg:tt)+) => {
{$(
let __suppress_unused_warning = $using_ident;
)*};
core::todo!($($message_arg)+);
};
($($using_ident: ident),* $(,)?) => {
{$(
let __suppress_unused_warning = $using_ident;
)*};
core::todo!();
};
}
for the extended version just look into the source code.
For you as an enduser this crate mostly serves as
I mostly wrote this though to serve as a playground for both macros-by-example and a few other features of the Rust ecosystem, like documentation. I don't expect any mayor issues to come up, and if that should happen I expect to fix them, but of course there is no guarantee of continued maintenance.