Skip to content

Commit

Permalink
Merge branch 'github-actions-ci' of https://github.com/stiiifff/cargo…
Browse files Browse the repository at this point in the history
…-edit into github-actions-ci
  • Loading branch information
Steve Degosserie committed Nov 21, 2019
2 parents b5777c1 + cbcbeac commit dd14195
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl Manifest {
// Dependencies can be in the three standard sections...
if self.data[dependency_type].is_table_like() {
sections.push((
vec![dependency_type.to_string()],
vec![(*dependency_type).to_string()],
self.data[dependency_type].clone(),
))
}
Expand All @@ -214,7 +214,7 @@ impl Manifest {
vec![
"target".to_string(),
target_name.to_string(),
dependency_type.to_string(),
(*dependency_type).to_string(),
],
dependency_table.clone(),
)
Expand Down Expand Up @@ -321,7 +321,6 @@ impl Manifest {
/// # Examples
///
/// ```
/// # fn main() {
/// use cargo_edit::{Dependency, Manifest};
/// use toml_edit;
///
Expand All @@ -331,7 +330,6 @@ impl Manifest {
/// assert!(manifest.remove_from_table("dependencies", &dep.name).is_ok());
/// assert!(manifest.remove_from_table("dependencies", &dep.name).is_err());
/// assert!(manifest.data["dependencies"].is_none());
/// # }
/// ```
pub fn remove_from_table(&mut self, table: &str, name: &str) -> Result<()> {
if !self.data[table].is_table_like() {
Expand Down

0 comments on commit dd14195

Please sign in to comment.