Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(turbopack): Fix a few syntactic nits #77310

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions turbopack/crates/turbo-tasks-backend/src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
if !parent_task.is_transient() {
let parent_task_type = self.lookup_task_type(parent_task);
panic!(
"Calling transient function {} from persistent function function {} is not allowed",
"Calling transient function {} from persistent function {} is not allowed",
task_type.get_name(),
parent_task_type.map_or("unknown", |t| t.get_name())
);
Expand Down Expand Up @@ -1068,7 +1068,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
task.invalidate_serialization();
}

fn get_task_description(&self, task_id: TaskId) -> std::string::String {
fn get_task_description(&self, task_id: TaskId) -> String {
self.lookup_task_type(task_id).map_or_else(
|| format!("{task_id:?} transient"),
|task_type| task_type.to_string(),
Expand Down Expand Up @@ -2047,7 +2047,7 @@ impl<B: BackingStorage> Backend for TurboTasksBackend<B> {
self.0.invalidate_serialization(task_id, turbo_tasks);
}

fn get_task_description(&self, task: TaskId) -> std::string::String {
fn get_task_description(&self, task: TaskId) -> String {
self.0.get_task_description(task)
}

Expand Down
1 change: 0 additions & 1 deletion turbopack/crates/turbopack-node/src/transforms/postcss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ use crate::{
struct PostCssProcessingResult {
css: String,
map: Option<String>,
#[turbo_tasks(trace_ignore)]
assets: Option<Vec<EmittedAsset>>,
}

Expand Down
4 changes: 2 additions & 2 deletions turbopack/crates/turbopack-node/src/transforms/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ use anyhow::Result;
use serde::{Deserialize, Serialize};
use serde_json::Value as JsonValue;
use turbo_rcstr::RcStr;
use turbo_tasks::{ResolvedVc, TryJoinIterExt};
use turbo_tasks::{trace::TraceRawVcs, NonLocalValue, ResolvedVc, TryJoinIterExt};
use turbo_tasks_fs::{File, FileContent, FileSystem};
use turbopack_core::{
asset::AssetContent, server_fs::ServerFileSystem, virtual_source::VirtualSource,
};

#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone, TraceRawVcs, NonLocalValue)]
#[serde(rename_all = "camelCase")]
pub struct EmittedAsset {
file: RcStr,
Expand Down
Loading