Skip to content

Commit b57d89f

Browse files
bartlomiejuclaude
andcommitted
chore: cargo fmt + clang-format
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b3fbcef commit b57d89f

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/isolate_create_params.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,7 @@ impl CreateParams {
181181
/// Sets the maximum size of the old generation in bytes. When the old
182182
/// generation approaches this limit, V8 will perform series of garbage
183183
/// collections and invoke the NearHeapLimitCallback.
184-
pub fn set_max_old_generation_size_in_bytes(
185-
mut self,
186-
limit: usize,
187-
) -> Self {
184+
pub fn set_max_old_generation_size_in_bytes(mut self, limit: usize) -> Self {
188185
self
189186
.raw
190187
.constraints
@@ -448,9 +445,7 @@ pub(crate) mod raw {
448445
}
449446

450447
pub fn max_old_generation_size_in_bytes(&self) -> usize {
451-
unsafe {
452-
v8__ResourceConstraints__max_old_generation_size_in_bytes(self)
453-
}
448+
unsafe { v8__ResourceConstraints__max_old_generation_size_in_bytes(self) }
454449
}
455450

456451
pub fn set_max_old_generation_size_in_bytes(&mut self, limit: usize) {
@@ -476,9 +471,7 @@ pub(crate) mod raw {
476471
}
477472

478473
pub fn code_range_size_in_bytes(&self) -> usize {
479-
unsafe {
480-
v8__ResourceConstraints__code_range_size_in_bytes(self)
481-
}
474+
unsafe { v8__ResourceConstraints__code_range_size_in_bytes(self) }
482475
}
483476

484477
pub fn set_code_range_size_in_bytes(&mut self, limit: usize) {

tests/test_api.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7685,10 +7685,7 @@ fn resource_constraints() {
76857685
.set_initial_old_generation_size_in_bytes(8 * 1024 * 1024)
76867686
.set_initial_young_generation_size_in_bytes(2 * 1024 * 1024);
76877687

7688-
assert_eq!(
7689-
params.max_old_generation_size_in_bytes(),
7690-
128 * 1024 * 1024
7691-
);
7688+
assert_eq!(params.max_old_generation_size_in_bytes(), 128 * 1024 * 1024);
76927689
assert_eq!(
76937690
params.max_young_generation_size_in_bytes(),
76947691
16 * 1024 * 1024

0 commit comments

Comments
 (0)