mirror of
https://github.com/orhun/systeroid
synced 2024-09-06 16:24:03 +00:00
refactor(app): rename the preloader function
This commit is contained in:
parent
c803fe4476
commit
251327519b
|
@ -188,7 +188,7 @@ impl<'a, Output: Write> App<'a, Output> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Processes the parameters in the given file.
|
/// Processes the parameters in the given file.
|
||||||
pub fn preload_values(&mut self, file: String) -> Result<()> {
|
pub fn preload_from_file(&mut self, file: String) -> Result<()> {
|
||||||
let path = PathBuf::from(file);
|
let path = PathBuf::from(file);
|
||||||
if !path.exists() {
|
if !path.exists() {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
|
|
|
@ -39,7 +39,7 @@ pub fn run(args: Args) -> Result<()> {
|
||||||
}
|
}
|
||||||
} else if args.preload_files {
|
} else if args.preload_files {
|
||||||
for file in args.values {
|
for file in args.values {
|
||||||
app.preload_values(file)?;
|
app.preload_from_file(file)?;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for param in args.values {
|
for param in args.values {
|
||||||
|
|
Loading…
Reference in a new issue