Skip to content

Commit

Permalink
Auto merge of #2126 - johshoff:default_dependency_header, r=alexcrichton
Browse files Browse the repository at this point in the history
Almost any project beyond "hello world" will have some dependencies.
Including the `[dependencies]` header by default makes this slightly
simpler.

For new users of the language, this can potentially save some
frustration since crates.io currently does not mention the header, just
the line that goes beneath it.

For all users, this makes adding the first dependency to a project less
of a special case than to subsequent dependencies.
  • Loading branch information
bors committed Nov 10, 2015
2 parents 178ede2 + e708411 commit 6026a18
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cargo/ops/cargo_new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ r#"[package]
name = "{}"
version = "0.1.0"
authors = [{}]
[dependencies]
"#, name, toml::Value::String(author)).as_bytes()));

try!(fs::create_dir(&path.join("src")));
Expand Down

0 comments on commit 6026a18

Please sign in to comment.