Skip to content

Commit 93f76a8

Browse files
author
Nick Cameron
committed
Tweak the new project template to be more idiomatic.
1 parent 08da2f5 commit 93f76a8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cargo/ops/cargo_new.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,11 @@ fn main() {
159159
"));
160160
} else {
161161
try!(paths::write(&path.join("src/lib.rs"), b"\
162-
#[test]
163-
fn it_works() {
162+
#[cfg(test)]
163+
mod test {
164+
#[test]
165+
fn it_works() {
166+
}
164167
}
165168
"));
166169
}

0 commit comments

Comments
 (0)