Skip to content

Commit 21eeaf5

Browse files
committed
rustfmt
1 parent 4afc9cf commit 21eeaf5

3 files changed

Lines changed: 26 additions & 24 deletions

File tree

‎mlua-sys/src/luau/luarequire.rs‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ pub struct luarequire_Configuration {
4949
requirer_chunkname: *const c_char,
5050
) -> luarequire_NavigateResult,
5151

52-
// Resets the internal state to point at an aliased module, given its exact path from a configuration
53-
// file. This function is only called when an alias's path cannot be resolved relative to its
54-
// configuration file.
52+
// Resets the internal state to point at an aliased module, given its exact path from a
53+
// configuration file. This function is only called when an alias's path cannot be resolved
54+
// relative to its configuration file.
5555
pub jump_to_alias: unsafe extern "C-unwind" fn(
5656
L: *mut lua_State,
5757
ctx: *mut c_void,
@@ -71,8 +71,8 @@ pub struct luarequire_Configuration {
7171
>,
7272

7373
// Provides a final override opportunity if an alias cannot be found in configuration files. If
74-
// NAVIGATE_SUCCESS is returned, this must update the internal state to point at the aliased module.
75-
// Can be left undefined.
74+
// NAVIGATE_SUCCESS is returned, this must update the internal state to point at the aliased
75+
// module. Can be left undefined.
7676
pub to_alias_fallback: Option<
7777
unsafe extern "C-unwind" fn(
7878
L: *mut lua_State,
@@ -93,8 +93,8 @@ pub struct luarequire_Configuration {
9393
// Returns whether the context is currently pointing at a module.
9494
pub is_module_present: unsafe extern "C-unwind" fn(L: *mut lua_State, ctx: *mut c_void) -> bool,
9595

96-
// Provides a chunkname for the current module. This will be accessible through the debug library. This
97-
// function is only called if is_module_present returns true.
96+
// Provides a chunkname for the current module. This will be accessible through the debug
97+
// library. This function is only called if is_module_present returns true.
9898
pub get_chunkname: unsafe extern "C-unwind" fn(
9999
L: *mut lua_State,
100100
ctx: *mut c_void,
@@ -123,9 +123,9 @@ pub struct luarequire_Configuration {
123123
size_out: *mut usize,
124124
) -> luarequire_WriteResult,
125125

126-
// Returns whether a configuration file is present in the current context, and if so, its syntax.
127-
// If not present, require-by-string will call to_parent until either a configuration file is present or
128-
// NAVIGATE_FAILURE is returned (at root).
126+
// Returns whether a configuration file is present in the current context, and if so, its
127+
// syntax. If not present, require-by-string will call to_parent until either a configuration
128+
// file is present or NAVIGATE_FAILURE is returned (at root).
129129
pub get_config_status:
130130
unsafe extern "C-unwind" fn(L: *mut lua_State, ctx: *mut c_void) -> luarequire_ConfigStatus,
131131

@@ -146,9 +146,9 @@ pub struct luarequire_Configuration {
146146
>,
147147

148148
// Provides the contents of the configuration file in the current context.
149-
// This function is only called if get_config_status does not return CONFIG_ABSENT. If this function
150-
// pointer is set, get_alias must not be set. Opting in to this function pointer enables parsing
151-
// configuration files internally.
149+
// This function is only called if get_config_status does not return CONFIG_ABSENT. If this
150+
// function pointer is set, get_alias must not be set. Opting in to this function pointer
151+
// enables parsing configuration files internally.
152152
pub get_config: Option<
153153
unsafe extern "C-unwind" fn(
154154
L: *mut lua_State,
@@ -159,17 +159,17 @@ pub struct luarequire_Configuration {
159159
) -> luarequire_WriteResult,
160160
>,
161161

162-
// Returns the maximum number of milliseconds to allow for executing a given Luau-syntax configuration
163-
// file. This function is only called if get_config_status returns CONFIG_PRESENT_LUAU and can be left
164-
// undefined if support for Luau-syntax configuration files is not needed. A default value of 2000ms is
165-
// used. Negative values are treated as infinite.
162+
// Returns the maximum number of milliseconds to allow for executing a given Luau-syntax
163+
// configuration file. This function is only called if get_config_status returns
164+
// CONFIG_PRESENT_LUAU and can be left undefined if support for Luau-syntax configuration files
165+
// is not needed. A default value of 2000ms is used. Negative values are treated as infinite.
166166
pub get_luau_config_timeout:
167167
Option<unsafe extern "C-unwind" fn(L: *mut lua_State, ctx: *mut c_void) -> c_int>,
168168

169-
// Executes the module and places the result on the stack. Returns the number of results placed on the
170-
// stack.
171-
// Returning -1 directs the requiring thread to yield. In this case, this thread should be resumed with
172-
// the module result pushed onto its stack.
169+
// Executes the module and places the result on the stack. Returns the number of results placed
170+
// on the stack.
171+
// Returning -1 directs the requiring thread to yield. In this case, this thread should be
172+
// resumed with the module result pushed onto its stack.
173173
pub load: unsafe extern "C-unwind" fn(
174174
L: *mut lua_State,
175175
ctx: *mut c_void,

‎src/error.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@ impl StdError for Error {
325325
// An error type with a source error should either return that error via source or
326326
// include that source's error message in its own Display output, but never both.
327327
// https://blog.rust-lang.org/inside-rust/2021/07/01/What-the-error-handling-project-group-is-working-towards.html
328-
// Given that we include source to fmt::Display implementation for `CallbackError`, this call
329-
// returns nothing.
328+
// Given that we include source to fmt::Display implementation for `CallbackError`, this
329+
// call returns nothing.
330330
Error::CallbackError { .. } => None,
331331
Error::ExternalError(err) => err.source(),
332332
Error::WithContext { cause, .. } => Self::source(cause),

‎tests/ffi.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
use mlua::ffi;
2+
13
#[test]
24
fn test_buffer_not_unpin() {
3-
static_assertions::assert_not_impl_any!(mlua::ffi::luaL_Buffer: Unpin);
5+
static_assertions::assert_not_impl_any!(ffi::luaL_Buffer: Unpin);
46
}

0 commit comments

Comments
 (0)