MCPcopy Create free account
hub / github.com/cowprotocol/services / to_rust_ident

Function to_rust_ident

contracts/src/codegen.rs:62–64  ·  view source on GitHub ↗

Convert a crate name (kebab-case) to a Rust identifier (underscore_case).

(crate_name: &str)

Source from the content-addressed store, hash-verified

60
61/// Convert a crate name (kebab-case) to a Rust identifier (underscore_case).
62fn to_rust_ident(crate_name: &str) -> String {
63 crate_name.replace('-', "_")
64}
65
66/// Metadata about a generated contract crate, used for facade generation.
67struct CrateEntry {

Callers 1

write_facade_libFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected