feat: add function and macro s to convert to String
Some checks failed
Test / build (map[name:nightly]) (push) Failing after 2m2s
Test / build (map[name:stable]) (push) Failing after 2m10s

This commit is contained in:
Paul Campbell 2025-01-08 21:05:51 +00:00
parent 96e7d4ebdd
commit 2481db69b1

View file

@ -1 +1,15 @@
//
#![allow(unused)]
/// Converts the parameter into a [String] using the [Into] trait.
pub fn s(v: impl Into<String>) -> String {
v.into()
}
/// Converts the parameter into a [String] by calling `.to_string()`.
#[macro_export]
macro_rules! s {
($value:expr) => {
$value.to_string()
};
}