Skip to content

Commit

Permalink
fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
heisen-li committed Dec 1, 2021
1 parent 56b8ae7 commit 64c69df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/cargo/util/command_prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ pub trait ArgMatchesExt {
}

fn index(&self) -> CargoResult<Option<String>> {
let index = self._value_of("index").map(|s| s.to_string());
let index = self._value_of("index").map(|s| s.to_string());
Ok(index)
}

Expand Down
9 changes: 1 addition & 8 deletions tests/testsuite/login.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
//! Tests for the `cargo login` command.

use cargo::core::Shell;
use cargo::util::config::Config;
use cargo_test_support::install::cargo_home;
use cargo_test_support::registry::{self, registry_url};
use cargo_test_support::registry;
use cargo_test_support::{cargo_process, paths, t};
use std::fs::{self, OpenOptions};
use std::io::prelude::*;
Expand All @@ -18,11 +16,6 @@ fn setup_new_credentials() {
setup_new_credentials_at(config);
}

fn setup_new_credentials_toml() {
let config = cargo_home().join("credentials.toml");
setup_new_credentials_at(config);
}

fn setup_new_credentials_at(config: PathBuf) {
t!(fs::create_dir_all(config.parent().unwrap()));
t!(fs::write(
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use cargo_test_support::git::{self, repo};
use cargo_test_support::paths;
use cargo_test_support::registry::{self, registry_path, registry_url, Package};
use cargo_test_support::registry::{self, registry_url, Package};
use cargo_test_support::{basic_manifest, no_such_file_err_msg, project, publish};
use std::fs;

Expand Down

0 comments on commit 64c69df

Please sign in to comment.