Skip to content

Commit 20f7ce0

Browse files
authored
Fix typos (#522)
* fix various typos in the codebase * fix typos in CHANGELOG.md
1 parent 6882e04 commit 20f7ce0

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ Breaking changes:
467467
- [**Breaking**] Removed `AnyUserData::has_metamethod()`
468468
- Added `Thread::reset()` for luajit/lua54 to recycle threads.
469469
It's possible to attach a new function to a thread (coroutine).
470-
- Added `chunk!` macro support to load chunks of Lua code using the Rust tokenizer and optinally capturing Rust variables.
470+
- Added `chunk!` macro support to load chunks of Lua code using the Rust tokenizer and optionally capturing Rust variables.
471471
- Improved error reporting (`Error`'s `__tostring` method formats full stacktraces). This is useful in the module mode.
472472

473473
## v0.6.0-beta.1
@@ -523,7 +523,7 @@ Breaking changes:
523523

524524
- Lua 5.4 support with `MetaMethod::Close`.
525525
- `lua53` feature is disabled by default. Now preferred Lua version have to be chosen explicitly.
526-
- 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()`.
526+
- 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()`.
527527
- New `send` feature to require `Send`.
528528
- New `module` feature, that disables linking to Lua Core Libraries. Required for modules.
529529
- Don't allow `'callback` outlive `'lua` in `Lua::create_function()` to fix [the unsoundness](tests/compile/static_callback_args.rs).

src/state/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl Drop for StateGuard<'_> {
2323
}
2424

2525
// An optimized version of `callback_error` that does not allocate `WrappedFailure` userdata
26-
// and instead reuses unsed values from previous calls (or allocates new).
26+
// and instead reuses unused values from previous calls (or allocates new).
2727
pub(super) unsafe fn callback_error_ext<F, R>(
2828
state: *mut ffi::lua_State,
2929
mut extra: *mut ExtraData,

tests/function.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ fn test_function_dump() -> Result<()> {
214214

215215
#[cfg(feature = "luau")]
216216
#[test]
217-
fn test_finction_coverage() -> Result<()> {
217+
fn test_function_coverage() -> Result<()> {
218218
let lua = Lua::new();
219219

220220
lua.set_compiler(mlua::Compiler::default().set_coverage_level(1));

tests/scope.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ fn test_scope_userdata_drop() -> Result<()> {
318318

319319
let ud = lua.globals().get::<AnyUserData>("ud")?;
320320
match ud.borrow_scoped::<MyUserData, _>(|_| Ok::<_, Error>(())) {
321-
Ok(_) => panic!("succesfull borrow for destructed userdata"),
321+
Ok(_) => panic!("successful borrow for destructed userdata"),
322322
Err(Error::UserDataDestructed) => {}
323323
Err(err) => panic!("improper borrow error for destructed userdata: {err:?}"),
324324
}

tests/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ fn test_error() -> Result<()> {
322322
let return_string_error = globals.get::<Function>("return_string_error")?;
323323
assert!(return_string_error.call::<Error>(()).is_ok());
324324

325-
match lua.load("if youre happy and you know it syntax error").exec() {
325+
match lua.load("if you're happy and you know it syntax error").exec() {
326326
Err(Error::SyntaxError {
327327
incomplete_input: false,
328328
..

0 commit comments

Comments
 (0)