Skip to content

Commit 21d39a0

Browse files
committed
Pass &Scope instead of &mut Scope to Lua::scope closure.
It was a leftover from an experimental implementation that has been removed.
1 parent 58965c6 commit 21d39a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/state.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1477,10 +1477,10 @@ impl Lua {
14771477
/// lifetimes only outlive the scope lifetime.
14781478
pub fn scope<'env, R>(
14791479
&self,
1480-
f: impl for<'scope> FnOnce(&'scope mut Scope<'scope, 'env>) -> Result<R>,
1480+
f: impl for<'scope> FnOnce(&'scope Scope<'scope, 'env>) -> Result<R>,
14811481
) -> Result<R> {
14821482
// TODO: Update to `&Scope` in next major release
1483-
f(&mut Scope::new(self.lock_arc()))
1483+
f(&Scope::new(self.lock_arc()))
14841484
}
14851485

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

0 commit comments

Comments
 (0)