MCPcopy Create free account
hub / github.com/BigBoot/AutoKuma / load_files

Function load_files

kuma-cli/src/utils.rs:114–126  ·  view source on GitHub ↗
(file: &Vec<PathBuf>, cli: &Cli)

Source from the content-addressed store, hash-verified

112 Many(Vec<T>),
113}
114pub(crate) async fn load_files<T>(file: &Vec<PathBuf>, cli: &Cli) -> Vec<T>
115where
116 T: Send + for<'de> serde::Deserialize<'de> + 'static,
117{
118 file.into_iter()
119 .map(|file| load_file(file, cli))
120 .collect::<Vec<_>>()
121 .pipe(|futures| join_all(futures))
122 .await
123 .into_iter()
124 .flatten()
125 .collect()
126}
127
128pub(crate) async fn load_file<T>(file: &PathBuf, cli: &Cli) -> Vec<T>
129where

Callers 5

handleFunction · 0.85
handleFunction · 0.85
handleFunction · 0.85
handleFunction · 0.85
handleFunction · 0.85

Calls 2

load_fileFunction · 0.85
flattenMethod · 0.80

Tested by

no test coverage detected