master > master: code-rust - String-type macro

This commit is contained in:
raj_mathe committed 2022-04-10 15:42:19 +02:00
1 parent 5f5165dca8
commit 279677fb7c
5 files changed
+68 -10

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
// ----------------------------------------------------------------
// IMPORTS
// ----------------------------------------------------------------
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Conversion macros - arrays
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/// Allows simpler inline creation of vectors of Strings
#[macro_export]
macro_rules! vec_of_strings{
() => {
Vec::<String>::new()
};
($element:expr $(, $elements:expr )* $(,)?)=>{
vec![ $element.to_string() $(, $elements.to_string() )* ]
};
}
+1
View File
@@ -1 +1,2 @@
pub mod assert;
pub mod convert;