Skip to content

Commit a24d215

Browse files
committed
Minor fixes in docs
1 parent 56c227f commit a24d215

7 files changed

Lines changed: 15 additions & 15 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ my_project $ LUA_LIB=$HOME/tmp/lua-5.2.4/src LUA_LIB_NAME=lua LUA_LINK=static ca
127127
Just enable the `vendored` feature and cargo will automatically build and link the specified Lua/LuaJIT version. This is the easiest way to get started with `mlua`.
128128

129129
### Standalone mode
130-
In standalone mode, `mlua` allows adding scripting support to your application with a gently configured Lua runtime to ensure safety and soundness.
130+
In standalone mode, `mlua` allows adding scripting support to your application with a properly configured Lua runtime to ensure safety and soundness.
131131

132132
Add to `Cargo.toml`:
133133

docs/release_notes/v0.10.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## mlua v0.10 release notes
22

3-
The v0.10 version of mlua has goal to improve the user experience while keeping the same performance and safety guarantees.
3+
The v0.10 version of mlua has a goal to improve the user experience while keeping the same performance and safety guarantees.
44
This document highlights the most notable features. For a full list of changes, see the [CHANGELOG].
55

66
[CHANGELOG]: https://github.com/mlua-rs/mlua/blob/main/CHANGELOG.md
@@ -40,7 +40,7 @@ assert_eq!(lua.globals().get::<i32>("i")?, 20);
4040

4141
Under the hood, to synchronize access to the Lua state, mlua uses [`ReentrantMutex`] which can be recursively locked by a single thread. Only one thread can execute Lua code at a time, but it's possible to share Lua values between threads.
4242

43-
This has some performance penalties (about 10-20%) compared to the lock free mode. This flag is disabled by default and does not supported in module mode.
43+
This has some performance penalties (about 10-20%) compared to the lock free mode. This flag is disabled by default and is not supported in module mode.
4444

4545
[`ReentrantMutex`]: https://docs.rs/parking_lot/latest/parking_lot/type.ReentrantMutex.html
4646

@@ -144,7 +144,7 @@ The following `Scope` methods were changed:
144144
Instead, scope has comprehensive support for borrowed userdata: `create_any_userdata_ref`, `create_any_userdata_ref_mut`, `create_userdata_ref`, `create_userdata_ref_mut`.
145145

146146
`UserDataRef` and `UserDataRefMut` are no longer acceptable for scoped userdata access as they require owned underlying data.
147-
In mlua v0.9 this can cause read-after-free bug in some edge cases.
147+
In mlua v0.9 this could cause a read-after-free bug in some edge cases.
148148

149149
To temporarily borrow underlying data, the `AnyUserData::borrow_scoped` and `AnyUserData::borrow_mut_scoped` methods were introduced:
150150

docs/release_notes/v0.9.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ It will automatically trigger JIT compilation for new Lua chunks. To disable it,
152152

153153
#### 1. Better error reporting
154154

155-
When calling a Rust function from Lua and passing wrong arguments, previous mlua versions reported a error message without any context or reference to the particular argument.
155+
When calling a Rust function from Lua and passing wrong arguments, previous mlua versions reported an error message without any context or reference to the particular argument.
156156

157-
In v0.9 it reports a error message with the argument index and expected type:
157+
In v0.9 it reports an error message with the argument index and expected type:
158158

159159
```rust
160160
let func = lua.create_function(|_, _a: i32| Ok(()))?;
@@ -327,7 +327,7 @@ Under the hood a new function `luaopen_alt_module` will be created for the Lua m
327327

328328
- `skip_memory_check` - skip memory allocation checks for some operations.
329329

330-
In module mode, mlua runs in unknown environment and cannot say are there any memory limits or not. As result, some operations that require memory allocation runs in
330+
In module mode, mlua runs in an unknown environment and cannot tell whether there are any memory limits or not. As a result, some operations that require memory allocation run in
331331
protected mode. Setting this attribute will improve performance of such operations with risk of having uncaught exceptions and memory leaks.
332332

333333
#### Improved Windows target

src/buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl Buffer {
5959
/// Returns an adaptor implementing [`io::Read`], [`io::Write`] and [`io::Seek`] over the
6060
/// buffer.
6161
///
62-
/// Buffer operations are infallible, none of the read/write functions will return a Err.
62+
/// Buffer operations are infallible, none of the read/write functions will return an Err.
6363
pub fn cursor(self) -> impl io::Read + io::Write + io::Seek {
6464
BufferCursor(self, 0)
6565
}

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,10 @@ pub use mlua_derive::FromLua;
262262
///
263263
/// * skip_memory_check - skip memory allocation checks for some operations.
264264
///
265-
/// In module mode, mlua runs in unknown environment and cannot say are there any memory
266-
/// limits or not. As result, some operations that require memory allocation runs in
267-
/// protected mode. Setting this attribute will improve performance of such operations
268-
/// with risk of having uncaught exceptions and memory leaks.
265+
/// In module mode, mlua runs in an unknown environment and cannot tell whether there are any memory
266+
/// limits or not. As a result, some operations that require memory allocation run in protected
267+
/// mode. Setting this attribute will improve performance of such operations with risk of having
268+
/// uncaught exceptions and memory leaks.
269269
///
270270
/// ```ignore
271271
/// #[mlua::lua_module(skip_memory_check)]

src/serde/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ pub trait LuaSerdeExt: Sealed {
3737
fn null(&self) -> Value;
3838

3939
/// A metatable attachable to a Lua table to systematically encode it as Array (instead of Map).
40-
/// As result, encoded Array will contain only sequence part of the table, with the same length
41-
/// as the `#` operator on that table.
40+
/// As a result, encoded Array will contain only sequence part of the table, with the same
41+
/// length as the `#` operator on that table.
4242
///
4343
/// # Example
4444
///

src/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ impl Thread {
356356
/// Resets a thread
357357
///
358358
/// In [Lua 5.4]: cleans its call stack and closes all pending to-be-closed variables.
359-
/// Returns a error in case of either the original error that stopped the thread or errors
359+
/// Returns an error in case of either the original error that stopped the thread or errors
360360
/// in closing methods.
361361
///
362362
/// In Luau: resets to the initial state of a newly created Lua thread.

0 commit comments

Comments
 (0)