Function
load_files
(file: &Vec<PathBuf>, cli: &Cli)
Source from the content-addressed store, hash-verified
| 112 | Many(Vec<T>), |
| 113 | } |
| 114 | pub(crate) async fn load_files<T>(file: &Vec<PathBuf>, cli: &Cli) -> Vec<T> |
| 115 | where |
| 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 | |
| 128 | pub(crate) async fn load_file<T>(file: &PathBuf, cli: &Cli) -> Vec<T> |
| 129 | where |
Tested by
no test coverage detected