Skip to content

Commit b501d96

Browse files
committed
remove the query() method
1 parent 69cef08 commit b501d96

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

turbopack/crates/turbopack-core/src/ident.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,6 @@ impl AssetIdent {
197197
*self.path
198198
}
199199

200-
#[turbo_tasks::function]
201-
pub fn query(&self) -> Vc<RcStr> {
202-
Vc::cell(self.query.clone())
203-
}
204-
205200
/// Computes a unique output asset name for the given asset identifier.
206201
/// TODO(alexkirsz) This is `turbopack-browser` specific, as
207202
/// `turbopack-nodejs` would use a content hash instead. But for now

turbopack/crates/turbopack-ecmascript/src/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ async fn parse_internal(
226226
fs_path_vc,
227227
fs_path,
228228
ident,
229-
source.ident().query().owned().await?,
229+
source.ident().await?.query.clone(),
230230
file_path_hash,
231231
source,
232232
ty,

turbopack/crates/turbopack-node/src/transforms/webpack.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ impl WebpackLoadersProcessedAsset {
266266
ResolvedVc::cell(content),
267267
// We need to pass the query string to the loader
268268
ResolvedVc::cell(resource_path.to_string().into()),
269-
ResolvedVc::cell(this.source.ident().query().await?.to_string().into()),
269+
ResolvedVc::cell(this.source.ident().await?.query.to_string().into()),
270270
ResolvedVc::cell(json!(*loaders)),
271271
ResolvedVc::cell(transform.source_maps.into()),
272272
],

turbopack/crates/turbopack-wasm/src/module_asset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl WebAssemblyModuleAsset {
6363
#[turbo_tasks::function]
6464
async fn loader_as_module(self: Vc<Self>) -> Result<Vc<Box<dyn Module>>> {
6565
let this = self.await?;
66-
let query = &*this.source.ident().query().await?;
66+
let query = &this.source.ident().await?.query;
6767

6868
let loader_source = if query == "module" {
6969
compiling_loader_source(*this.source)

turbopack/crates/turbopack-wasm/src/source.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use anyhow::Result;
22
use serde::{Deserialize, Serialize};
3+
use turbo_rcstr::rcstr;
34
use turbo_tasks::{NonLocalValue, ResolvedVc, TaskInput, Vc, trace::TraceRawVcs};
45
use turbo_tasks_fs::{File, FileContent};
56
use turbopack_core::{
@@ -56,7 +57,7 @@ impl Source for WebAssemblySource {
5657
WebAssemblySourceType::Text => self
5758
.source
5859
.ident()
59-
.with_path(self.source.ident().path().append("_.wasm".into())),
60+
.with_path(self.source.ident().path().append(rcstr!("_.wasm"))),
6061
}
6162
}
6263
}

0 commit comments

Comments
 (0)