Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
use anyhow::Result;
use turbo_rcstr::RcStr;
use turbo_tasks::Vc;
#[turbo_tasks::function]
pub async fn instrumentation_files(page_extensions: Vc<Vec<RcStr>>) -> Result<Vc<Vec<RcStr>>> {
let extensions = page_extensions.await?;
let files = ["instrumentation.", "src/instrumentation."]
.into_iter()
.flat_map(|f| {
extensions
.iter()
.map(move |ext| String::from(f) + ext.as_str())
.map(RcStr::from)
})
.collect();
Ok(Vc::cell(files))
}