Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix typos #522

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/state/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion tests/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:?}"),
}
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
..
Expand Down
Loading