Unverified Commit 8dc0eff8 authored by Benjamin Woodruff's avatar Benjamin Woodruff Committed by GitHub

Delete dead `concatenate_output_assets` function (#65337)

I noticed this was dead while working on other changes to this file.

Checked that it built with:

```
cargo check
```
parent e8acd2d9
......@@ -36,11 +36,11 @@ use next_core::{
};
use serde::{Deserialize, Serialize};
use tracing::Instrument;
use turbo_tasks::{trace::TraceRawVcs, Completion, TryFlatJoinIterExt, TryJoinIterExt, Value, Vc};
use turbo_tasks::{trace::TraceRawVcs, Completion, TryJoinIterExt, Value, Vc};
use turbopack_binding::{
turbo::{
tasks_env::{CustomProcessEnv, ProcessEnv},
tasks_fs::{rope::RopeBuilder, File, FileContent, FileSystemPath},
tasks_fs::{File, FileContent, FileSystemPath},
},
turbopack::{
core::{
......@@ -1244,36 +1244,6 @@ impl AppEndpoint {
}
}
#[turbo_tasks::function]
async fn concatenate_output_assets(
path: Vc<FileSystemPath>,
files: Vc<OutputAssets>,
) -> Result<Vc<Box<dyn OutputAsset>>> {
let mut concatenated_content = RopeBuilder::default();
let contents = files
.await?
.iter()
.map(|&file| async move {
Ok(
if let AssetContent::File(content) = *file.content().await? {
Some(content.await?)
} else {
None
},
)
})
.try_flat_join()
.await?;
for file in contents.iter().flat_map(|content| content.as_content()) {
concatenated_content.concat(file.content());
concatenated_content.push_static_bytes(b"\n\n");
}
Ok(Vc::upcast(VirtualOutputAsset::new(
path,
AssetContent::file(FileContent::Content(concatenated_content.build().into()).cell()),
)))
}
#[turbo_tasks::value_impl]
impl Endpoint for AppEndpoint {
#[turbo_tasks::function]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment