Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy warning #6546

Merged
merged 2 commits into from
Jan 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cargo/core/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ impl ser::Serialize for Target {
kind: &self.kind,
crate_types: self.rustc_crate_types(),
name: &self.name,
src_path: src_path,
src_path,
edition: &self.edition.to_string(),
required_features: self
.required_features
Expand Down
12 changes: 6 additions & 6 deletions src/cargo/ops/cargo_new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ struct IgnoreList {
impl IgnoreList {
/// constructor to build a new ignore file
fn new() -> IgnoreList {
return IgnoreList{
ignore: Vec::new(),
IgnoreList {
ignore: Vec::new(),
hg_ignore: Vec::new(),
}
}
Expand All @@ -440,9 +440,9 @@ impl IgnoreList {
/// version control system as `String`.
fn format_new(&self, vcs: VersionControl) -> String {
match vcs {
VersionControl::Hg => return self.hg_ignore.join("\n"),
_ => return self.ignore.join("\n"),
};
VersionControl::Hg => self.hg_ignore.join("\n"),
_ => self.ignore.join("\n"),
}
}

/// format_existing is used to format the IgnoreList when the ignore file
Expand Down Expand Up @@ -501,7 +501,7 @@ fn write_ignore_file(base_path: &Path, list: &IgnoreList, vcs: VersionControl) -

paths::append(&fp_ignore, ignore.as_bytes())?;

return Ok(ignore)
Ok(ignore)
}

/// initialize the correct vcs system based on the provided config
Expand Down