docs: differentiate fn s from macro s
All checks were successful
Test / build (map[name:nightly]) (push) Successful in 1m13s
Test / build (map[name:stable]) (push) Successful in 1m7s
Release Please / Release-plz (push) Successful in 7s

This commit is contained in:
Paul Campbell 2025-01-09 21:27:08 +00:00
parent 885de22736
commit d00f3337f9

View file

@ -2,11 +2,16 @@
#![allow(unused)]
/// Converts the parameter into a [String] using the [Into] trait.
///
/// Requires parameter to implement a [From] or [Into] trait to allow it be transformed.
pub fn s(v: impl Into<String>) -> String {
v.into()
}
/// Converts the parameter into a [String] by calling `.to_string()`.
///
/// Unlike the [s] function, the value only need to have a [to_string] method. Preusmably it will
/// return a [String], but this macro doesn't make that gaurantee.
#[macro_export]
macro_rules! s {
($value:expr) => {