mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Fix typos (#522)
* fix various typos in the codebase * fix typos in CHANGELOG.md
This commit is contained in:
committed by
Alex Orlenko
parent
c3817409a8
commit
fd68b033f0
+2
-2
@@ -467,7 +467,7 @@ Breaking changes:
|
||||
- [**Breaking**] Removed `AnyUserData::has_metamethod()`
|
||||
- Added `Thread::reset()` for luajit/lua54 to recycle threads.
|
||||
It's possible to attach a new function to a thread (coroutine).
|
||||
- Added `chunk!` macro support to load chunks of Lua code using the Rust tokenizer and optinally capturing Rust variables.
|
||||
- Added `chunk!` macro support to load chunks of Lua code using the Rust tokenizer and optionally capturing Rust variables.
|
||||
- Improved error reporting (`Error`'s `__tostring` method formats full stacktraces). This is useful in the module mode.
|
||||
|
||||
## v0.6.0-beta.1
|
||||
@@ -523,7 +523,7 @@ Breaking changes:
|
||||
|
||||
- Lua 5.4 support with `MetaMethod::Close`.
|
||||
- `lua53` feature is disabled by default. Now preferred Lua version have to be chosen explicitly.
|
||||
- Provide safety guaraness for Lua state, which means that potenially unsafe operations, like loading C modules (using `require` or `package.loadlib`) are disabled. Equalient for the previous `Lua::new()` function is `Lua::unsafe_new()`.
|
||||
- Provide safety guarantees for Lua state, which means that potentially unsafe operations, like loading C modules (using `require` or `package.loadlib`) are disabled. Equivalent to the previous `Lua::new()` function is `Lua::unsafe_new()`.
|
||||
- New `send` feature to require `Send`.
|
||||
- New `module` feature, that disables linking to Lua Core Libraries. Required for modules.
|
||||
- Don't allow `'callback` outlive `'lua` in `Lua::create_function()` to fix [the unsoundness](tests/compile/static_callback_args.rs).
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ impl Drop for StateGuard<'_> {
|
||||
}
|
||||
|
||||
// An optimized version of `callback_error` that does not allocate `WrappedFailure` userdata
|
||||
// and instead reuses unsed values from previous calls (or allocates new).
|
||||
// and instead reuses unused values from previous calls (or allocates new).
|
||||
pub(super) unsafe fn callback_error_ext<F, R>(
|
||||
state: *mut ffi::lua_State,
|
||||
mut extra: *mut ExtraData,
|
||||
|
||||
+1
-1
@@ -214,7 +214,7 @@ fn test_function_dump() -> Result<()> {
|
||||
|
||||
#[cfg(feature = "luau")]
|
||||
#[test]
|
||||
fn test_finction_coverage() -> Result<()> {
|
||||
fn test_function_coverage() -> Result<()> {
|
||||
let lua = Lua::new();
|
||||
|
||||
lua.set_compiler(mlua::Compiler::default().set_coverage_level(1));
|
||||
|
||||
+1
-1
@@ -318,7 +318,7 @@ fn test_scope_userdata_drop() -> Result<()> {
|
||||
|
||||
let ud = lua.globals().get::<AnyUserData>("ud")?;
|
||||
match ud.borrow_scoped::<MyUserData, _>(|_| Ok::<_, Error>(())) {
|
||||
Ok(_) => panic!("succesfull borrow for destructed userdata"),
|
||||
Ok(_) => panic!("successful borrow for destructed userdata"),
|
||||
Err(Error::UserDataDestructed) => {}
|
||||
Err(err) => panic!("improper borrow error for destructed userdata: {err:?}"),
|
||||
}
|
||||
|
||||
+1
-1
@@ -322,7 +322,7 @@ fn test_error() -> Result<()> {
|
||||
let return_string_error = globals.get::<Function>("return_string_error")?;
|
||||
assert!(return_string_error.call::<Error>(()).is_ok());
|
||||
|
||||
match lua.load("if youre happy and you know it syntax error").exec() {
|
||||
match lua.load("if you're happy and you know it syntax error").exec() {
|
||||
Err(Error::SyntaxError {
|
||||
incomplete_input: false,
|
||||
..
|
||||
|
||||
Reference in New Issue
Block a user