style: 🎨 Reorder methods

This commit is contained in:
Sergio Gasquez 2022-09-20 10:36:48 +00:00
parent 2159be4792
commit a5e361acde

View File

@ -52,23 +52,6 @@ pub struct EspIdf {
}
impl EspIdf {
/// Create a new instance with the propper arguments.
pub fn new(version: &str, minified: bool, targets: Vec<Chip>) -> EspIdf {
let install_path = PathBuf::from(get_tools_path());
debug!(
"{} ESP-IDF install path: {}",
emoji::DEBUG,
install_path.display()
);
Self {
repository_url: DEFAULT_GIT_REPOSITORY.to_string(),
version: version.to_string(),
minified,
install_path,
targets,
}
}
/// Installs esp-idf.
pub fn install(self) -> Result<()> {
let cmake_generator = DEFAULT_CMAKE_GENERATOR;
@ -132,4 +115,21 @@ impl EspIdf {
}))?;
Ok(())
}
/// Create a new instance with the propper arguments.
pub fn new(version: &str, minified: bool, targets: Vec<Chip>) -> EspIdf {
let install_path = PathBuf::from(get_tools_path());
debug!(
"{} ESP-IDF install path: {}",
emoji::DEBUG,
install_path.display()
);
Self {
repository_url: DEFAULT_GIT_REPOSITORY.to_string(),
version: version.to_string(),
minified,
install_path,
targets,
}
}
}