Skip to content

Commit

Permalink
Rename OutputContent::read_untracked to OutputContent::as_read_result
Browse files Browse the repository at this point in the history
  • Loading branch information
bgw committed Sep 10, 2024
1 parent 2b2ea65 commit 47394d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion turbopack/crates/turbo-tasks-memory/src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl Output {
pub fn read_untracked(&self) -> Result<RawVc> {
match &self.content {
None => Err(anyhow!("Output is empty")),
Some(content) => content.read_untracked(),
Some(content) => content.as_read_result(),
}
}

Expand Down
4 changes: 1 addition & 3 deletions turbopack/crates/turbo-tasks/src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ pub enum OutputContent {
}

impl OutputContent {
/// INVALIDATION: Be careful with this, it will not track dependencies, so
/// using it could break cache invalidation.
pub fn read_untracked(&self) -> anyhow::Result<RawVc> {
pub fn as_read_result(&self) -> anyhow::Result<RawVc> {
match &self {
Self::Error(err) => Err(anyhow::Error::new(err.clone())),
Self::Link(raw_vc) => Ok(*raw_vc),
Expand Down

0 comments on commit 47394d2

Please sign in to comment.