MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / string

Function string

flow-derive/src/lit.rs:16–18  ·  view source on GitHub ↗
(lit: T)

Source from the content-addressed store, hash-verified

14use syn::{Ident, LitStr};
15
16pub fn string<T: Display>(lit: T) -> LitStr {
17 LitStr::new(lit.to_string().as_str(), Span::call_site())
18}
19
20pub fn ident(lit: impl AsRef<str>) -> Ident {
21 Ident::new(lit.as_ref(), Span::call_site())

Callers 1

name_expandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected