Skip to content

Commit 6db3df9

Browse files
committed
Format source code and fix clippy lint (#443)
1 parent 6d5686c commit 6db3df9

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/binding.cc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ bool v8__Module__IsSourceTextModule(const v8::Module& self) {
17401740
return ptr_to_local(&self)->IsSourceTextModule();
17411741
}
17421742

1743-
bool v8__Module__IsSyntheticModule(const v8::Module&self) {
1743+
bool v8__Module__IsSyntheticModule(const v8::Module& self) {
17441744
return ptr_to_local(&self)->IsSyntheticModule();
17451745
}
17461746

@@ -1753,16 +1753,15 @@ const v8::Module* v8__Module__CreateSyntheticModule(
17531753
export_names.push_back(ptr_to_local(export_names_raw[i]));
17541754
}
17551755
return local_to_ptr(v8::Module::CreateSyntheticModule(
1756-
isolate, ptr_to_local(module_name), export_names,
1757-
evaluation_steps));
1756+
isolate, ptr_to_local(module_name), export_names, evaluation_steps));
17581757
}
17591758

17601759
MaybeBool v8__Module__SetSyntheticModuleExport(const v8::Module& self,
17611760
v8::Isolate* isolate,
17621761
const v8::String* export_name,
17631762
const v8::Value* export_value) {
17641763
return maybe_to_maybe_bool(ptr_to_local(&self)->SetSyntheticModuleExport(
1765-
isolate, ptr_to_local(export_name), ptr_to_local(export_value)));
1764+
isolate, ptr_to_local(export_name), ptr_to_local(export_value)));
17661765
}
17671766

17681767
using HeapSnapshotCallback = bool (*)(void*, const char*, size_t);
@@ -1837,9 +1836,9 @@ void v8__HeapStatistics__CONSTRUCT(uninit_t<v8::HeapStatistics>* buf) {
18371836

18381837
// The const_cast doesn't violate const correctness, the methods
18391838
// are simple getters that don't mutate the object or global state.
1840-
#define V(name) \
1841-
size_t v8__HeapStatistics__##name(const v8::HeapStatistics* s) { \
1842-
return const_cast<v8::HeapStatistics*>(s)->name(); \
1839+
#define V(name) \
1840+
size_t v8__HeapStatistics__##name(const v8::HeapStatistics* s) { \
1841+
return const_cast<v8::HeapStatistics*>(s)->name(); \
18431842
}
18441843

18451844
V(total_heap_size)

src/scope.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,10 +1420,7 @@ pub(crate) mod data {
14201420

14211421
impl ScopeTypeSpecificData {
14221422
pub fn is_none(&self) -> bool {
1423-
match self {
1424-
Self::None => true,
1425-
_ => false,
1426-
}
1423+
matches!(self, Self::None)
14271424
}
14281425

14291426
/// Replaces a `ScopeTypeSpecificData::None` value with the value returned

0 commit comments

Comments
 (0)