Skip to content

Commit 928e1d9

Browse files
committed
Revert &Scope to &mut Scope
1 parent 5b8681d commit 928e1d9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/state.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,9 +1470,10 @@ impl Lua {
14701470
/// lifetimes only outlive the scope lifetime.
14711471
pub fn scope<'env, R>(
14721472
&self,
1473-
f: impl for<'scope> FnOnce(&'scope Scope<'scope, 'env>) -> Result<R>,
1473+
f: impl for<'scope> FnOnce(&'scope mut Scope<'scope, 'env>) -> Result<R>,
14741474
) -> Result<R> {
1475-
f(&Scope::new(self.lock_arc()))
1475+
// TODO: Update to `&Scope` in next major release
1476+
f(&mut Scope::new(self.lock_arc()))
14761477
}
14771478

14781479
/// Attempts to coerce a Lua value into a String in a manner consistent with Lua's internal

0 commit comments

Comments
 (0)