Skip to content

Commit

Permalink
Auto merge of #54 - killercup:feature/maintainance, r=killercup
Browse files Browse the repository at this point in the history
Some maintainance work

- Fix `make fmt`
- Fix Clippy
- Update dependencies
  • Loading branch information
homu committed Oct 24, 2015
2 parents 546c6c6 + 184374d commit 3f5bb9b
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 21 deletions.
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ fmt:
rustfmt src/bin/list/main.rs --write-mode=overwrite && \
rustfmt src/bin/add/main.rs --write-mode=overwrite && \
rustfmt src/bin/rm/main.rs --write-mode=overwrite && \
rustfmt tests/*.rs --write-mode=overwrite
find tests/*.rs -exec rustfmt "{}" --write-mode=overwrite ";"

.PHONY: build release fmt
1 change: 1 addition & 0 deletions src/bin/add/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! `cargo add`

#![deny(missing_docs, missing_debug_implementations, missing_copy_implementations, trivial_casts, trivial_numeric_casts, unsafe_code, unstable_features, unused_import_braces, unused_qualifications)]
#![cfg_attr(feature = "dev", allow(unstable_features))]
#![cfg_attr(feature = "dev", feature(plugin))]
#![cfg_attr(feature = "dev", plugin(clippy))]

Expand Down
1 change: 1 addition & 0 deletions src/bin/list/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! `cargo add`

#![deny(missing_docs, missing_debug_implementations, missing_copy_implementations, trivial_casts, trivial_numeric_casts, unsafe_code, unstable_features, unused_import_braces, unused_qualifications)]
#![cfg_attr(feature = "dev", allow(unstable_features))]
#![cfg_attr(feature = "dev", feature(plugin))]
#![cfg_attr(feature = "dev", plugin(clippy))]

Expand Down
1 change: 1 addition & 0 deletions src/bin/rm/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! `cargo rm`

#![deny(missing_docs, missing_debug_implementations, missing_copy_implementations, trivial_casts, trivial_numeric_casts, unsafe_code, unstable_features, unused_import_braces, unused_qualifications)]
#![cfg_attr(feature = "dev", allow(unstable_features))]
#![cfg_attr(feature = "dev", feature(plugin))]
#![cfg_attr(feature = "dev", plugin(clippy))]

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#![cfg_attr(test, allow(dead_code))]
#![deny(missing_docs, missing_debug_implementations, missing_copy_implementations, trivial_casts, trivial_numeric_casts, unsafe_code, unstable_features, unused_import_braces, unused_qualifications)]
#![cfg_attr(feature = "dev", allow(unstable_features))]
#![cfg_attr(feature = "dev", feature(plugin))]
#![cfg_attr(feature = "dev", plugin(clippy))]

Expand Down
6 changes: 4 additions & 2 deletions tests/cargo-add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ fn adds_fixed_version() {
let toml = get_toml(&manifest);
assert!(toml.lookup("dependencies.versioned-package").is_none());

execute_command(&["add", "versioned-package", "--vers", ">=0.1.1"], &manifest);
execute_command(&["add", "versioned-package", "--vers", ">=0.1.1"],
&manifest);

// dependency present afterwards
let toml = get_toml(&manifest);
Expand Down Expand Up @@ -177,7 +178,8 @@ fn adds_optional_dep() {
let toml = get_toml(&manifest);
assert!(toml.lookup("dependencies.versioned-package").is_none());

execute_command(&["add", "versioned-package", "--vers", ">=0.1.1", "--optional"], &manifest);
execute_command(&["add", "versioned-package", "--vers", ">=0.1.1", "--optional"],
&manifest);

// dependency present afterwards
let toml = get_toml(&manifest);
Expand Down
5 changes: 3 additions & 2 deletions tests/cargo-rm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn remove_existing_dependency() {

let toml = get_toml(&manifest);
assert!(toml.lookup("dependencies.docopt").is_some());
execute_command(&["rm","docopt"], &manifest);
execute_command(&["rm", "docopt"], &manifest);
let toml = get_toml(&manifest);
assert!(toml.lookup("dependencies.docopt").is_none());
}
Expand Down Expand Up @@ -40,7 +40,8 @@ fn remove_section_after_removed_last_dependency() {

let toml = get_toml(&manifest);
assert!(toml.lookup("dev-dependencies.regex").is_some());
assert_eq!(toml.lookup("dev-dependencies").unwrap().as_table().unwrap().len(), 1);
assert_eq!(toml.lookup("dev-dependencies").unwrap().as_table().unwrap().len(),
1);

execute_command(&["rm", "--dev", "regex"], &manifest);

Expand Down

0 comments on commit 3f5bb9b

Please sign in to comment.