Commit d6ced88
fix: recover scope lifetime in ValueView::new to satisfy nightly borrow checker
The nightly Rust compiler correctly rejects borrowing a by-value
Local<'s, String> parameter since &*string creates a reference to the
stack-local copy that is dropped at end of function. We recover the 's
lifetime via pointer cast, which is safe because Local<'s, _> guarantees
the V8 string is rooted in a HandleScope that lives for at least 's.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent fa63f51 commit d6ced88
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1137 | 1137 | | |
1138 | 1138 | | |
1139 | 1139 | | |
1140 | | - | |
1141 | | - | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
1142 | 1145 | | |
1143 | 1146 | | |
1144 | 1147 | | |
| |||
0 commit comments