mirror of
https://github.com/esp-rs/espup.git
synced 2025-09-29 22:01:07 +00:00
style: 🎨 Reorder methods
This commit is contained in:
parent
2159be4792
commit
a5e361acde
@ -52,23 +52,6 @@ pub struct EspIdf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl 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.
|
/// Installs esp-idf.
|
||||||
pub fn install(self) -> Result<()> {
|
pub fn install(self) -> Result<()> {
|
||||||
let cmake_generator = DEFAULT_CMAKE_GENERATOR;
|
let cmake_generator = DEFAULT_CMAKE_GENERATOR;
|
||||||
@ -132,4 +115,21 @@ impl EspIdf {
|
|||||||
}))?;
|
}))?;
|
||||||
Ok(())
|
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,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user