Skip to content

Commit 7190c33

Browse files
committed
code cleanup
1 parent 96d73ef commit 7190c33

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

crates/next-api/src/analyze.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use turbopack_core::{
2323
reference::all_assets_from_entries,
2424
};
2525

26-
use crate::route::{Endpoint, ModuleGraphs};
26+
use crate::route::ModuleGraphs;
2727

2828
#[derive(
2929
Default, Clone, Debug, Deserialize, Eq, NonLocalValue, PartialEq, Serialize, TraceRawVcs,
@@ -540,13 +540,6 @@ pub async fn analyze_module_graphs(module_graphs: Vc<ModuleGraphs>) -> Result<Vc
540540
Ok(FileContent::Content(File::from(rope)).cell())
541541
}
542542

543-
#[turbo_tasks::function]
544-
pub async fn analyze_endpoint(endpoint: Vc<Box<dyn Endpoint>>) -> Result<Vc<FileContent>> {
545-
Ok(analyze_output_assets(
546-
*endpoint.output().await?.output_assets,
547-
))
548-
}
549-
550543
#[turbo_tasks::value]
551544
pub struct AnalyzeDataOutputAsset {
552545
pub path: FileSystemPath,
@@ -556,10 +549,13 @@ pub struct AnalyzeDataOutputAsset {
556549
#[turbo_tasks::value_impl]
557550
impl AnalyzeDataOutputAsset {
558551
#[turbo_tasks::function]
559-
pub async fn new(path: FileSystemPath, output_assets: Vc<OutputAssets>) -> Result<Vc<Self>> {
552+
pub async fn new(
553+
path: FileSystemPath,
554+
output_assets: ResolvedVc<OutputAssets>,
555+
) -> Result<Vc<Self>> {
560556
Ok(Self {
561557
path,
562-
output_assets: output_assets.to_resolved().await?,
558+
output_assets,
563559
}
564560
.cell())
565561
}

0 commit comments

Comments
 (0)