Skip to content

Commit

Permalink
📃 docs: 更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
wtklbm committed Nov 22, 2023
1 parent bb7442e commit a1872a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ pub fn cargo_home() -> PathBuf {

pub fn cargo_config_path() -> PathBuf {
let mut c = cargo_home();

// Cargo 还读取不带 `.toml` 扩展名的配置文件,例如 `~/.cargo/config`
// 如果该文件存在,Cargo 将首先使用不带扩展名的文件
// https://doc.rust-lang.org/cargo/reference/config.html
c.push(CONFIG);

// Rust v1.39 版本中添加了对该 `.toml` 扩展的支持,并且是首选形式
if !c.exists() {
c.set_file_name(CONFIG_TOML);
}
Expand Down

0 comments on commit a1872a2

Please sign in to comment.