Merge pull request #5 from SergioGasquez/fix/docs-spellcheck

docs: 📝 Run cargo-spellcheck to fix docs typos
This commit is contained in:
Sergio Gasquez Arcos 2022-10-04 10:35:14 +02:00 committed by GitHub
commit 5d8b038a76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -158,7 +158,7 @@ impl EspIdfRepo {
Ok(exports) Ok(exports)
} }
/// Create a new instance with the propper arguments. /// Create a new instance with the proper arguments.
pub fn new(version: &str, minified: bool, targets: HashSet<Target>) -> EspIdfRepo { pub fn new(version: &str, minified: bool, targets: HashSet<Target>) -> EspIdfRepo {
let install_path = PathBuf::from(get_tools_path()); let install_path = PathBuf::from(get_tools_path());
debug!( debug!(
@ -194,20 +194,20 @@ pub fn get_install_path(repo: EspIdfRemote) -> PathBuf {
install_path install_path
} }
/// Gets path where esp-idf tools where be downloaded and installed. If enviroment /// Gets path where esp-idf tools where be downloaded and installed. If environment
/// variable IDF_TOOLS_PATH is not set. Uses HOME/.espressif on Linux and macOS, /// variable IDF_TOOLS_PATH is not set. Uses HOME/.espressif on Linux and macOS,
/// and %USER_PROFILE%\.espressif on Windows. /// and %USER_PROFILE%\.espressif on Windows.
pub fn get_tools_path() -> String { pub fn get_tools_path() -> String {
env::var("IDF_TOOLS_PATH").unwrap_or_else(|_e| get_home_dir() + "/.espressif") env::var("IDF_TOOLS_PATH").unwrap_or_else(|_e| get_home_dir() + "/.espressif")
} }
/// Gets the espressif tools directory path. Tools direcotry is where the tools /// Gets the espressif tools directory path. Tools directory is where the tools
/// are extracted. /// are extracted.
pub fn get_tool_path(tool_name: &str) -> String { pub fn get_tool_path(tool_name: &str) -> String {
format!("{}/tools/{}", get_tools_path(), tool_name) format!("{}/tools/{}", get_tools_path(), tool_name)
} }
/// Gets the espressif dist directory path. Dist directory is where the archives /// Gets the Espressif dist directory path. Dist directory is where the archives
/// of the tools are downloaded. /// of the tools are downloaded.
pub fn get_dist_path(tool_name: &str) -> String { pub fn get_dist_path(tool_name: &str) -> String {
let tools_path = get_tools_path(); let tools_path = get_tools_path();

View File

@ -16,11 +16,11 @@ const DEFAULT_XTENSA_RUST_REPOSITORY: &str =
pub struct RustToolchain { pub struct RustToolchain {
/// Xtensa Rust toolchain file. /// Xtensa Rust toolchain file.
pub dist_file: String, pub dist_file: String,
/// Xtensa Rust toolchain url. /// Xtensa Rust toolchain URL.
pub dist_url: String, pub dist_url: String,
/// Xtensa Src Rust toolchain file. /// Xtensa Src Rust toolchain file.
pub src_dist_file: String, pub src_dist_file: String,
/// Xtensa Src Rust toolchain url. /// Xtensa Src Rust toolchain URL.
pub src_dist_url: String, pub src_dist_url: String,
/// Path to the cargo home directory. /// Path to the cargo home directory.
pub cargo_home: PathBuf, pub cargo_home: PathBuf,
@ -285,7 +285,7 @@ fn get_installer(host_triple: &str) -> &str {
} }
} }
/// Checks if rustup and the propper nightly version are installed. If they are /// Checks if rustup and the proper nightly version are installed. If they are
/// not, proceed to install them. /// not, proceed to install them.
pub fn check_rust_installation(nightly_version: &str) -> Result<()> { pub fn check_rust_installation(nightly_version: &str) -> Result<()> {
info!("{} Checking existing Rust installation", emoji::WRENCH); info!("{} Checking existing Rust installation", emoji::WRENCH);
@ -404,7 +404,7 @@ pub fn install_riscv_target(nightly_version: &str) -> Result<()> {
Ok(()) Ok(())
} }
/// Installs the dessired version of the nightly toolchain. /// Installs the desired version of the nightly toolchain.
fn install_rust_nightly(version: &str) -> Result<()> { fn install_rust_nightly(version: &str) -> Result<()> {
info!("{} Installing {} toolchain", emoji::WRENCH, version); info!("{} Installing {} toolchain", emoji::WRENCH, version);
cmd!( cmd!(

View File

@ -113,7 +113,7 @@ pub fn download_file(
Ok(format!("{}/{}", output_directory, file_name)) Ok(format!("{}/{}", output_directory, file_name))
} }
/// Creates the export file with the neccesary environment variables. /// Creates the export file with the necessary environment variables.
pub fn export_environment(export_file: &PathBuf, exports: &[String]) -> Result<()> { pub fn export_environment(export_file: &PathBuf, exports: &[String]) -> Result<()> {
info!("{} Creating export file", emoji::WRENCH); info!("{} Creating export file", emoji::WRENCH);
let mut file = File::create(export_file)?; let mut file = File::create(export_file)?;