Skip to content

Commit 8521fcc

Browse files
committed
fixup for simpler signature
1 parent 4b7e475 commit 8521fcc

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

crates/next-core/src/next_app/metadata/image.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async fn hash_file_content(path: Vc<FileSystemPath>) -> Result<u64> {
2929

3030
Ok(match &*original_file_content {
3131
FileContent::Content(content) => {
32-
let content = content.content().to_bytes()?;
32+
let content = content.content().to_bytes();
3333
hash_xxh3_hash64(&*content)
3434
}
3535
FileContent::NotFound => {

crates/next-core/src/next_app/metadata/route.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ async fn get_base64_file_content(path: Vc<FileSystemPath>) -> Result<String> {
117117

118118
Ok(match &*original_file_content {
119119
FileContent::Content(content) => {
120-
let content = content.content().to_bytes()?;
120+
let content = content.content().to_bytes();
121121
Base64Display::new(&content, &STANDARD).to_string()
122122
}
123123
FileContent::NotFound => {

crates/next-core/src/next_font/local/font_fallback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ async fn get_font_adjustment(
108108
FileContent::Content(file) => file.content(),
109109
};
110110

111-
let font_file_binary = font_file_rope.to_bytes()?;
111+
let font_file_binary = font_file_rope.to_bytes();
112112
let scope = allsorts::binary::read::ReadScope::new(&font_file_binary);
113113
let mut font = Font::new(scope.read::<FontData>()?.table_provider(0)?)?.context(format!(
114114
"Unable to read font metrics from font file at {}",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn minify(code: Code, source_maps: bool, mangle: Option<MangleType>) -> Resu
3636
.then(|| code.generate_source_map_ref())
3737
.transpose()?;
3838

39-
let source_code = code.into_source_code().into_bytes()?.into_owned();
39+
let source_code = code.into_source_code().into_bytes().into_owned();
4040
let source_code = String::from_utf8(source_code)?;
4141

4242
let cm = Arc::new(SwcSourceMap::new(FilePathMapping::empty()));

turbopack/crates/turbopack-image/src/process/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ pub async fn get_meta_data(
347347
let FileContent::Content(content) = &*content.await? else {
348348
bail!("Input image not found");
349349
};
350-
let bytes = content.content().to_bytes()?;
350+
let bytes = content.content().to_bytes();
351351
let path_resolved = ident.path().to_resolved().await?;
352352
let path = path_resolved.await?;
353353
let extension = path.extension_ref();
@@ -430,7 +430,7 @@ pub async fn optimize(
430430
let FileContent::Content(content) = &*content.await? else {
431431
return Ok(FileContent::NotFound.cell());
432432
};
433-
let bytes = content.content().to_bytes()?;
433+
let bytes = content.content().to_bytes();
434434
let path = ident.path().to_resolved().await?;
435435

436436
let Some((image, format)) = load_image(path, &bytes, ident.path().await?.extension_ref())

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl WebpackLoadersProcessedAsset {
230230
"binary".to_string(),
231231
JsonValue::from(
232232
base64::engine::general_purpose::STANDARD
233-
.encode(file_content.content().to_bytes().unwrap()),
233+
.encode(file_content.content().to_bytes()),
234234
),
235235
)))),
236236
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub(crate) async fn analyze(source: Vc<WebAssemblySource>) -> Result<Vc<WebAssem
2929
return Ok(analysis.cell());
3030
};
3131

32-
let mut bytes = &*file.content().to_bytes()?;
32+
let mut bytes = &*file.content().to_bytes();
3333

3434
let mut parser = Parser::new(0);
3535
loop {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl Asset for WebAssemblySource {
7676
return Ok(AssetContent::file(FileContent::NotFound.cell()));
7777
};
7878

79-
let bytes = file.content().to_bytes()?;
79+
let bytes = file.content().to_bytes();
8080
let parsed = wat::parse_bytes(&bytes)?;
8181

8282
Ok(AssetContent::file(File::from(&*parsed).into()))

0 commit comments

Comments
 (0)