diff --git a/crates/turbo-tasks-fs/src/lib.rs b/crates/turbo-tasks-fs/src/lib.rs index 1e866d636c199..f823c6953a4fb 100644 --- a/crates/turbo-tasks-fs/src/lib.rs +++ b/crates/turbo-tasks-fs/src/lib.rs @@ -1021,6 +1021,14 @@ impl FileSystemPath { #[turbo_tasks::value(transparent)] pub struct FileSystemPathOption(Option>); +#[turbo_tasks::value_impl] +impl FileSystemPathOption { + #[turbo_tasks::function] + pub fn none() -> Vc { + Vc::cell(None) + } +} + #[turbo_tasks::value_impl] impl FileSystemPath { /// Create a new Vc from a path withing a FileSystem. The @@ -1112,7 +1120,7 @@ impl FileSystemPath { Self::new_normalized(this.fs, path).resolve().await?, ))) } else { - Ok(Vc::cell(None)) + Ok(FileSystemPathOption::none()) } } @@ -1128,7 +1136,7 @@ impl FileSystemPath { ))); } } - Ok(Vc::cell(None)) + Ok(FileSystemPathOption::none()) } #[turbo_tasks::function] diff --git a/crates/turbopack-css/src/chunk/mod.rs b/crates/turbopack-css/src/chunk/mod.rs index 26795fe810975..982835bde506b 100644 --- a/crates/turbopack-css/src/chunk/mod.rs +++ b/crates/turbopack-css/src/chunk/mod.rs @@ -90,7 +90,7 @@ impl CssChunk { while !*path.is_inside(current).await? { let parent = current.parent().resolve().await?; if parent == current { - return Ok(Vc::cell(None)); + return Ok(FileSystemPathOption::none()); } current = parent; } diff --git a/crates/turbopack-ecmascript/src/chunk/mod.rs b/crates/turbopack-ecmascript/src/chunk/mod.rs index 4cbe1c146a70f..1fda115396542 100644 --- a/crates/turbopack-ecmascript/src/chunk/mod.rs +++ b/crates/turbopack-ecmascript/src/chunk/mod.rs @@ -150,7 +150,7 @@ impl EcmascriptChunk { while !*path.is_inside_or_equal(current).await? { let parent = current.parent().resolve().await?; if parent == current { - return Ok(Vc::cell(None)); + return Ok(FileSystemPathOption::none()); } current = parent; }