Skip to content

Commit b6ac47f

Browse files
committed
chore: fix semicolons
auto-fixed trailing semicolons by running ``` clippy --fix --all-features --all-targets --workspace -- -W clippy::semicolon_if_nothing_returned ``` See [`semicolon_if_nothing_returned`](https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned) clippy lint.
1 parent a873224 commit b6ac47f

20 files changed

+92
-88
lines changed

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fn build_v8(is_asan: bool) {
205205
));
206206
// Fix GN's host_cpu detection when using x86_64 bins on Apple Silicon
207207
if cfg!(target_os = "macos") && cfg!(target_arch = "aarch64") {
208-
gn_args.push("host_cpu=\"arm64\"".to_string())
208+
gn_args.push("host_cpu=\"arm64\"".to_string());
209209
}
210210

211211
if env::var_os("DISABLE_CLANG").is_some() {

src/V8.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub fn initialize_platform(platform: SharedRef<Platform>) {
185185

186186
{
187187
unsafe {
188-
v8__V8__InitializePlatform(&*platform as *const Platform as *mut _)
188+
v8__V8__InitializePlatform(&*platform as *const Platform as *mut _);
189189
};
190190
}
191191
}

src/bigint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl BigInt {
124124
sign_bit.as_mut_ptr(),
125125
&mut word_count,
126126
words.as_mut_ptr(),
127-
)
127+
);
128128
}
129129

130130
let sign_bit = unsafe { sign_bit.assume_init() };

src/context.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ impl Context {
189189
self,
190190
Self::ANNEX_SLOT,
191191
annex_ptr as *mut _,
192-
)
192+
);
193193
};
194194
assert!(
195195
unsafe { v8__Context__GetNumberOfEmbedderDataFields(self) } as int
@@ -311,7 +311,7 @@ impl Context {
311311
self,
312312
Self::ANNEX_SLOT,
313313
null_mut(),
314-
)
314+
);
315315
};
316316
}
317317
}
@@ -329,7 +329,7 @@ impl Context {
329329
self,
330330
slot + Self::INTERNAL_SLOT_COUNT,
331331
data,
332-
)
332+
);
333333
}
334334

335335
#[inline(always)]

src/cppgc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ pub fn initialize_process(platform: SharedRef<Platform>) {
155155
#[deprecated(note = "use correctly spelled initialize_process")]
156156
#[inline]
157157
pub fn initalize_process(platform: SharedRef<Platform>) {
158-
initialize_process(platform)
158+
initialize_process(platform);
159159
}
160160

161161
/// # Safety
@@ -203,7 +203,7 @@ impl<T> Traced for TracedReference<T> {
203203
cppgc__Visitor__Trace__TracedReference(
204204
visitor,
205205
self as *const TracedReference<T> as *const TracedReference<Data>,
206-
)
206+
);
207207
}
208208
}
209209
}

src/handle.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ impl<T> Drop for Global<T> {
294294
// been disposed.
295295
} else {
296296
// Destroy the storage cell that contains the contents of this Global.
297-
v8__Global__Reset(self.data.cast().as_ptr())
297+
v8__Global__Reset(self.data.cast().as_ptr());
298298
}
299299
}
300300
}
@@ -436,7 +436,7 @@ impl<T> Eq for Global<T> where T: Eq {}
436436

437437
impl<'s, T: Hash> Hash for Local<'s, T> {
438438
fn hash<H: Hasher>(&self, state: &mut H) {
439-
(**self).hash(state)
439+
(**self).hash(state);
440440
}
441441
}
442442

@@ -562,7 +562,7 @@ impl HandleHost {
562562
assert!(
563563
self.match_host(other, scope_opt),
564564
"attempt to use Handle in an Isolate that is not its host"
565-
)
565+
);
566566
}
567567

568568
#[allow(dead_code)]
@@ -571,7 +571,7 @@ impl HandleHost {
571571
}
572572

573573
fn assert_match_isolate(self, isolate: &mut Isolate) {
574-
self.assert_match_host(isolate.into(), Some(isolate))
574+
self.assert_match_host(isolate.into(), Some(isolate));
575575
}
576576

577577
fn get_isolate(self) -> NonNull<Isolate> {
@@ -873,7 +873,7 @@ impl<T> Weak<T> {
873873
v8__WeakCallbackInfo__SetSecondPassCallback(
874874
wci,
875875
Self::second_pass_callback,
876-
)
876+
);
877877
};
878878
}
879879
}

src/inspector.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -142,22 +142,22 @@ unsafe extern "C" fn v8_inspector__V8Inspector__Channel__BASE__sendResponse(
142142
call_id: int,
143143
message: UniquePtr<StringBuffer>,
144144
) {
145-
ChannelBase::dispatch_mut(this).send_response(call_id, message)
145+
ChannelBase::dispatch_mut(this).send_response(call_id, message);
146146
}
147147

148148
#[no_mangle]
149149
unsafe extern "C" fn v8_inspector__V8Inspector__Channel__BASE__sendNotification(
150150
this: &mut Channel,
151151
message: UniquePtr<StringBuffer>,
152152
) {
153-
ChannelBase::dispatch_mut(this).send_notification(message)
153+
ChannelBase::dispatch_mut(this).send_notification(message);
154154
}
155155

156156
#[no_mangle]
157157
unsafe extern "C" fn v8_inspector__V8Inspector__Channel__BASE__flushProtocolNotifications(
158158
this: &mut Channel,
159159
) {
160-
ChannelBase::dispatch_mut(this).flush_protocol_notifications()
160+
ChannelBase::dispatch_mut(this).flush_protocol_notifications();
161161
}
162162

163163
#[no_mangle]
@@ -173,14 +173,14 @@ unsafe extern "C" fn v8_inspector__V8InspectorClient__BASE__runMessageLoopOnPaus
173173
context_group_id: int,
174174
) {
175175
V8InspectorClientBase::dispatch_mut(this)
176-
.run_message_loop_on_pause(context_group_id)
176+
.run_message_loop_on_pause(context_group_id);
177177
}
178178

179179
#[no_mangle]
180180
unsafe extern "C" fn v8_inspector__V8InspectorClient__BASE__quitMessageLoopOnPause(
181181
this: &mut V8InspectorClient,
182182
) {
183-
V8InspectorClientBase::dispatch_mut(this).quit_message_loop_on_pause()
183+
V8InspectorClientBase::dispatch_mut(this).quit_message_loop_on_pause();
184184
}
185185

186186
#[no_mangle]
@@ -189,7 +189,7 @@ unsafe extern "C" fn v8_inspector__V8InspectorClient__BASE__runIfWaitingForDebug
189189
context_group_id: int,
190190
) {
191191
V8InspectorClientBase::dispatch_mut(this)
192-
.run_if_waiting_for_debugger(context_group_id)
192+
.run_if_waiting_for_debugger(context_group_id);
193193
}
194194

195195
#[no_mangle]
@@ -211,7 +211,7 @@ unsafe extern "C" fn v8_inspector__V8InspectorClient__BASE__consoleAPIMessage(
211211
line_number,
212212
column_number,
213213
stack_trace,
214-
)
214+
);
215215
}
216216

217217
#[no_mangle]
@@ -240,17 +240,17 @@ impl Channel {
240240
message: UniquePtr<StringBuffer>,
241241
) {
242242
unsafe {
243-
v8_inspector__V8Inspector__Channel__sendResponse(self, call_id, message)
243+
v8_inspector__V8Inspector__Channel__sendResponse(self, call_id, message);
244244
}
245245
}
246246
pub fn send_notification(&mut self, message: UniquePtr<StringBuffer>) {
247247
unsafe {
248-
v8_inspector__V8Inspector__Channel__sendNotification(self, message)
248+
v8_inspector__V8Inspector__Channel__sendNotification(self, message);
249249
}
250250
}
251251
pub fn flush_protocol_notifications(&mut self) {
252252
unsafe {
253-
v8_inspector__V8Inspector__Channel__flushProtocolNotifications(self)
253+
v8_inspector__V8Inspector__Channel__flushProtocolNotifications(self);
254254
}
255255
}
256256
}
@@ -419,7 +419,7 @@ mod tests {
419419
self.log_call();
420420
}
421421
fn flush_protocol_notifications(&mut self) {
422-
self.log_call()
422+
self.log_call();
423423
}
424424
}
425425

@@ -464,7 +464,7 @@ impl V8InspectorClient {
464464
v8_inspector__V8InspectorClient__runMessageLoopOnPause(
465465
self,
466466
context_group_id,
467-
)
467+
);
468468
}
469469
}
470470

@@ -477,7 +477,7 @@ impl V8InspectorClient {
477477
v8_inspector__V8InspectorClient__runIfWaitingForDebugger(
478478
self,
479479
context_group_id,
480-
)
480+
);
481481
}
482482
}
483483

@@ -502,7 +502,7 @@ impl V8InspectorClient {
502502
line_number,
503503
column_number,
504504
stack_trace,
505-
)
505+
);
506506
}
507507
}
508508

@@ -668,7 +668,7 @@ impl V8InspectorSession {
668668

669669
pub fn dispatch_protocol_message(&mut self, message: StringView) {
670670
unsafe {
671-
v8_inspector__V8InspectorSession__dispatchProtocolMessage(self, message)
671+
v8_inspector__V8InspectorSession__dispatchProtocolMessage(self, message);
672672
}
673673
}
674674

@@ -680,7 +680,7 @@ impl V8InspectorSession {
680680
unsafe {
681681
v8_inspector__V8InspectorSession__schedulePauseOnNextStatement(
682682
self, reason, detail,
683-
)
683+
);
684684
}
685685
}
686686
}
@@ -899,7 +899,7 @@ impl<'a, T> Deref for CharacterArray<'a, T> {
899899
} = *self;
900900
if m_characters.is_null() {
901901
assert_eq!(m_length, 0);
902-
m_characters = NonNull::dangling().as_ptr()
902+
m_characters = NonNull::dangling().as_ptr();
903903
};
904904
unsafe { slice::from_raw_parts(m_characters, m_length) }
905905
}
@@ -1002,7 +1002,7 @@ impl V8Inspector {
10021002
context_group_id,
10031003
human_readable_name,
10041004
aux_data,
1005-
)
1005+
);
10061006
}
10071007
}
10081008

src/isolate.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ impl Isolate {
792792
/// between 0 and `Isolate::get_number_of_data_slots()`.
793793
#[inline(always)]
794794
pub fn set_data(&mut self, slot: u32, data: *mut c_void) {
795-
self.set_data_internal(Self::INTERNAL_DATA_SLOT_COUNT + slot, data)
795+
self.set_data_internal(Self::INTERNAL_DATA_SLOT_COUNT + slot, data);
796796
}
797797

798798
/// Returns the maximum number of available embedder data slots. Valid slots
@@ -909,7 +909,7 @@ impl Isolate {
909909
/// constructed and exited when dropped.
910910
#[inline(always)]
911911
pub unsafe fn enter(&mut self) {
912-
v8__Isolate__Enter(self)
912+
v8__Isolate__Enter(self);
913913
}
914914

915915
/// Exits this isolate by restoring the previously entered one in the
@@ -922,7 +922,7 @@ impl Isolate {
922922
/// constructed and exited when dropped.
923923
#[inline(always)]
924924
pub unsafe fn exit(&mut self) {
925-
v8__Isolate__Exit(self)
925+
v8__Isolate__Exit(self);
926926
}
927927

928928
/// Optional notification that the system is running low on memory.
@@ -976,7 +976,7 @@ impl Isolate {
976976
self,
977977
capture,
978978
frame_limit,
979-
)
979+
);
980980
}
981981
}
982982

@@ -1024,7 +1024,7 @@ impl Isolate {
10241024
// it's empty. That is, you can't return None and that's why the Rust API
10251025
// expects Local<Value> instead of Option<Local<Value>>.
10261026
unsafe {
1027-
v8__Isolate__SetPrepareStackTraceCallback(self, callback.map_fn_to())
1027+
v8__Isolate__SetPrepareStackTraceCallback(self, callback.map_fn_to());
10281028
};
10291029
}
10301030

@@ -1071,7 +1071,7 @@ impl Isolate {
10711071
callback: HostInitializeImportMetaObjectCallback,
10721072
) {
10731073
unsafe {
1074-
v8__Isolate__SetHostInitializeImportMetaObjectCallback(self, callback)
1074+
v8__Isolate__SetHostInitializeImportMetaObjectCallback(self, callback);
10751075
}
10761076
}
10771077

@@ -1086,7 +1086,7 @@ impl Isolate {
10861086
v8__Isolate__SetHostImportModuleDynamicallyCallback(
10871087
self,
10881088
callback.to_c_fn(),
1089-
)
1089+
);
10901090
}
10911091
}
10921092

@@ -1164,7 +1164,7 @@ impl Isolate {
11641164
gc_type_filter: GCType,
11651165
) {
11661166
unsafe {
1167-
v8__Isolate__AddGCPrologueCallback(self, callback, data, gc_type_filter)
1167+
v8__Isolate__AddGCPrologueCallback(self, callback, data, gc_type_filter);
11681168
}
11691169
}
11701170

@@ -1204,7 +1204,7 @@ impl Isolate {
12041204
heap_limit: usize,
12051205
) {
12061206
unsafe {
1207-
v8__Isolate__RemoveNearHeapLimitCallback(self, callback, heap_limit)
1207+
v8__Isolate__RemoveNearHeapLimitCallback(self, callback, heap_limit);
12081208
};
12091209
}
12101210

@@ -1312,7 +1312,7 @@ impl Isolate {
13121312
v8__Isolate__DateTimeConfigurationChangeNotification(
13131313
self,
13141314
time_zone_detection,
1315-
)
1315+
);
13161316
}
13171317
}
13181318

@@ -1345,7 +1345,7 @@ impl Isolate {
13451345
GarbageCollectionType::Full => 0,
13461346
GarbageCollectionType::Minor => 1,
13471347
},
1348-
)
1348+
);
13491349
}
13501350
}
13511351

@@ -1385,7 +1385,7 @@ impl Isolate {
13851385

13861386
let arg = addr_of_mut!(callback);
13871387
unsafe {
1388-
v8__HeapProfiler__TakeHeapSnapshot(self, trampoline::<F>, arg as _)
1388+
v8__HeapProfiler__TakeHeapSnapshot(self, trampoline::<F>, arg as _);
13891389
}
13901390
}
13911391

src/isolate_create_params.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ pub(crate) mod raw {
317317
self,
318318
initial_heap_size_in_bytes,
319319
maximum_heap_size_in_bytes,
320-
)
320+
);
321321
};
322322
}
323323

@@ -331,7 +331,7 @@ pub(crate) mod raw {
331331
self,
332332
physical_memory,
333333
virtual_memory_limit,
334-
)
334+
);
335335
}
336336
}
337337
}

0 commit comments

Comments
 (0)