INNER CODE UNIT · Rust
create_new_game
xajik/thedeck · scripts/thedeck-helper/src/main.rs:114
fn create_new_game(
pascal_case: &str,
camel_case: &str,
snake_case: &str,
) -> Result<String, Box<dyn std::error::Error>> {
let header = format_header()
.lines()
.map(|line| format!("+{}", line))
.collect::<Vec<String>>()
.join("\n");
let mut git_patch = include_str!("../templates/game/0001-FEAT-ClassName-Game-Template.patch").to_string();
git_patch = git_patch.replace("Dummy", pascal_case);
git_patch = git_patch.replace("dummy", snake_case);
git_patch = git_patch.replace("+/*
*
* *