Skip to content

Commit

Permalink
Fix doc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rosik authored and gmoshkin committed Nov 1, 2021
1 parent efaaa26 commit 5d145bb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions hlua/ffi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//! Module provides FFI bindings for the following constants,
//! types and functions, realted to Lua C API:
//! 1. Plain lua C API
//! 2. lauxlib
//! 3. Lua utitlites, implemented in Tarantool
#![allow(non_camel_case_types)]
use std::os::raw::{c_double, c_int, c_schar};
use std::ptr::null_mut;

/// Module provides FFI bindings for the following constants,
/// types and functions, realted to Lua C API:
/// 1. Plain lua C API
/// 2. lauxlib
/// 3. Lua utitlites, implemented in Tarantool
/// Lua provides a registry, a pre-defined table that can be used by any C code
/// to store whatever Lua value it needs to store. This table is always located
/// at pseudo-index `LUA_REGISTRYINDEX`. Any C library can store data into this
Expand Down Expand Up @@ -70,7 +70,7 @@ pub type lua_Integer = libc::ptrdiff_t;
/// (the first argument is pushed first). So, when the function starts,
/// [`lua_gettop`]`(L)` returns the number of arguments received by the function.
/// The first argument (if any) is at index 1 and its last argument is at index
/// [`lua_gettop`](L). To return values to Lua, a C function just pushes them
/// [`lua_gettop`]`(L)`. To return values to Lua, a C function just pushes them
/// onto the stack, in direct order (the first result is pushed first), and
/// returns the number of results. Any other value in the stack below the
/// results will be properly discarded by Lua. Like a Lua function, a C function
Expand Down
22 changes: 11 additions & 11 deletions hlua/hlua/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ pub trait PushOne<L>: Push<L> {}

/// Type that cannot be instantiated.
///
/// Will be replaced with `!` eventually (https://github.com/rust-lang/rust/issues/35121).
/// Will be replaced with `!` eventually (<https://github.com/rust-lang/rust/issues/35121>).
#[derive(Debug, Copy, Clone)]
pub enum Void {}

Expand Down Expand Up @@ -523,7 +523,7 @@ impl<'lua> Lua<'lua> {
/// Opens all standard Lua libraries.
///
/// See the reference for the standard library here:
/// https://www.lua.org/manual/5.2/manual.html#6
/// <https://www.lua.org/manual/5.2/manual.html#6>
///
/// This is done by calling `luaL_openlibs`.
///
Expand All @@ -541,71 +541,71 @@ impl<'lua> Lua<'lua> {

/// Opens base library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_base
/// <https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_base>
#[inline]
pub fn open_base(&mut self) {
unsafe { ffi::luaopen_base(self.lua.0) }
}

/// Opens bit32 library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_bit32
/// <https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_bit32>
#[inline]
pub fn open_bit(&mut self) {
unsafe { ffi::luaopen_bit(self.lua.0) }
}

/// Opens debug library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_debug
/// <https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_debug>
#[inline]
pub fn open_debug(&mut self) {
unsafe { ffi::luaopen_debug(self.lua.0) }
}

/// Opens io library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_io
/// <https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_io>
#[inline]
pub fn open_io(&mut self) {
unsafe { ffi::luaopen_io(self.lua.0) }
}

/// Opens math library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_math
/// <https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_math>
#[inline]
pub fn open_math(&mut self) {
unsafe { ffi::luaopen_math(self.lua.0) }
}

/// Opens os library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_os
/// <https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_os>
#[inline]
pub fn open_os(&mut self) {
unsafe { ffi::luaopen_os(self.lua.0) }
}

/// Opens package library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_package
/// <https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_package>
#[inline]
pub fn open_package(&mut self) {
unsafe { ffi::luaopen_package(self.lua.0) }
}

/// Opens string library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_string
/// <https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_string>
#[inline]
pub fn open_string(&mut self) {
unsafe { ffi::luaopen_string(self.lua.0) }
}

/// Opens table library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_table
/// <https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_table>
#[inline]
pub fn open_table(&mut self) {
unsafe { ffi::luaopen_table(self.lua.0) }
Expand Down
2 changes: 1 addition & 1 deletion tarantool/src/fiber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ where
/// **NOTE**: The argument `f` is a function that returns `T`. In case when `T =
/// ()` (no return value) one should instead use [`defer_proc`].
///
/// The new fiber can be joined by calling [`JuaJoinHandle::join`] method on
/// The new fiber can be joined by calling [`LuaJoinHandle::join`] method on
/// it's join handle.
pub fn defer<F, T>(f: F) -> LuaJoinHandle<T>
where
Expand Down

0 comments on commit 5d145bb

Please sign in to comment.