cargo换中科大源

windows/linux 下给 cargo 换中科大源

~/.cargo/config 文件编辑为

[http]
check-revoke = false

[source.crates-io]
replace-with = 'ustc'

[source.ustc]
registry = "https://mirrors.ustc.edu.cn/crates.io-index"

如果是 windows ,则将 ~ 换为 C:\Users\username\