Skip to content

Commit

Permalink
Revert &Scope to &mut Scope
Browse files Browse the repository at this point in the history
  • Loading branch information
khvzak committed Oct 31, 2024
1 parent 5b8681d commit 928e1d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1470,9 +1470,10 @@ impl Lua {
/// lifetimes only outlive the scope lifetime.
pub fn scope<'env, R>(
&self,
f: impl for<'scope> FnOnce(&'scope Scope<'scope, 'env>) -> Result<R>,
f: impl for<'scope> FnOnce(&'scope mut Scope<'scope, 'env>) -> Result<R>,
) -> Result<R> {
f(&Scope::new(self.lock_arc()))
// TODO: Update to `&Scope` in next major release
f(&mut Scope::new(self.lock_arc()))
}

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

0 comments on commit 928e1d9

Please sign in to comment.