style: 冗余闭包改函数路径并补文档段空行

This commit is contained in:
2026-10-01 09:42:20 +00:00
parent d7f54e331a
commit b4e36fc147
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -266,7 +266,7 @@ impl Vm {
if obj.is_weak_map_obj() {
weak_map::rewrite_weak_map_native(
obj,
|key| crate::session_gc::resolve_weak_key_after_promotion(key),
crate::session_gc::resolve_weak_key_after_promotion,
|value| value,
);
}
@@ -279,7 +279,7 @@ impl Vm {
if obj.is_weak_map_obj() {
weak_map::rewrite_weak_map_native(
obj,
|key| crate::session_gc::resolve_weak_key_after_promotion(key),
crate::session_gc::resolve_weak_key_after_promotion,
|value| value,
);
}
+1 -1
View File
@@ -622,7 +622,7 @@ impl SessionGc {
if obj.is_gc_marked() && obj.is_weak_map_obj() {
// SAFETY: 弱表 native 盒独占,整表重建在定夺期间无并发读者。
unsafe {
weak_map::rewrite_weak_map_native(&mut *ptr, |key| resolve_weak_key_sweep(key), |value| value);
weak_map::rewrite_weak_map_native(&mut *ptr, resolve_weak_key_sweep, |value| value);
}
}
}