Skip to content

Commit 1a6456d

Browse files
committed
Revert "chore: re-add raw_json field stripping to isolate its perf cost"
This reverts commit a81735c.
1 parent a81735c commit 1a6456d

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

src/package_json/simd.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,7 @@ impl JSONCell {
3333
pub fn try_new(mut buf: Vec<u8>) -> Result<Self, SimdParseError> {
3434
let value = to_borrowed_value(&mut buf)?;
3535
// SAFETY: This is safe because `buf` is owned by the `JSONCell` struct,
36-
#[allow(unused_mut)]
37-
let mut value =
38-
unsafe { std::mem::transmute::<BorrowedValue<'_>, BorrowedValue<'static>>(value) };
39-
40-
#[cfg(feature = "package_json_raw_json_api")]
41-
if let Some(json_object) = value.as_object_mut() {
42-
json_object.remove("description");
43-
json_object.remove("keywords");
44-
json_object.remove("scripts");
45-
json_object.remove("dependencies");
46-
json_object.remove("devDependencies");
47-
json_object.remove("peerDependencies");
48-
json_object.remove("optionalDependencies");
49-
}
36+
let value = unsafe { std::mem::transmute::<BorrowedValue<'_>, BorrowedValue<'static>>(value) };
5037

5138
Ok(Self {
5239
value,

0 commit comments

Comments
 (0)