mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Some doc improvements
This commit is contained in:
+1
-1
@@ -1319,7 +1319,7 @@ impl Lua {
|
||||
///
|
||||
/// By default JIT is enabled. Changing this option does not have any effect on
|
||||
/// already loaded functions.
|
||||
#[cfg(any(feature = "luau-jit", docsrs))]
|
||||
#[cfg(any(feature = "luau-jit", doc))]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "luau-jit")))]
|
||||
pub fn enable_jit(&self, enable: bool) {
|
||||
unsafe { (*self.extra.get()).enable_jit = enable };
|
||||
|
||||
+3
-3
@@ -99,7 +99,7 @@ impl<T> MaybeSend for T {}
|
||||
#[derive(Debug, Default, Clone, Copy, PartialEq)]
|
||||
pub struct Vector(pub(crate) [f32; Self::SIZE]);
|
||||
|
||||
#[cfg(feature = "luau")]
|
||||
#[cfg(any(feature = "luau", doc))]
|
||||
impl fmt::Display for Vector {
|
||||
#[rustfmt::skip]
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
@@ -110,7 +110,7 @@ impl fmt::Display for Vector {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "luau")]
|
||||
#[cfg(any(feature = "luau", doc))]
|
||||
impl Vector {
|
||||
pub(crate) const SIZE: usize = if cfg!(feature = "luau-vector4") { 4 } else { 3 };
|
||||
|
||||
@@ -168,7 +168,7 @@ impl Serialize for Vector {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "luau")]
|
||||
#[cfg(any(feature = "luau", doc))]
|
||||
impl PartialEq<[f32; Self::SIZE]> for Vector {
|
||||
#[inline]
|
||||
fn eq(&self, other: &[f32; Self::SIZE]) -> bool {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//! Mostly copied from bevy_utils
|
||||
//! https://github.com/bevyengine/bevy/blob/main/crates/bevy_utils/src/short_names.rs
|
||||
//! Mostly copied from [bevy_utils]
|
||||
//!
|
||||
//! [bevy_utils]: https://github.com/bevyengine/bevy/blob/main/crates/bevy_utils/src/short_names.rs
|
||||
|
||||
use std::any::type_name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user