Skip to content

Commit cf043fd

Browse files
committed
Fix test and address review nit
Signed-off-by: Ryan Levick <[email protected]>
1 parent c5d7226 commit cf043fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/templates/src/manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ mod tests {
746746
);
747747

748748
let content_dir = template.content_dir().as_ref().unwrap();
749-
let cargo = tokio::fs::read_to_string(content_dir.join("Cargo.toml"))
749+
let cargo = tokio::fs::read_to_string(content_dir.join("Cargo.toml.tmpl"))
750750
.await
751751
.unwrap();
752752
assert!(cargo.contains("name = \"{{project-name | kebab_case}}\""));

crates/templates/src/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ impl Run {
349349
// Strip optional .tmpl extension
350350
// Templates can use this if they don't want to store files with their final extensions
351351
let paths = paths.into_iter().map(|p| {
352-
if p.extension().map(|e| e == "tmpl").unwrap_or_default() {
352+
if p.extension().is_some_and(|e| e == "tmpl") {
353353
p.with_extension("")
354354
} else {
355355
p

0 commit comments

Comments
 (0)