Some doc improvements

This commit is contained in:
Alex Orlenko
2023-07-11 00:23:31 +01:00
parent 4adc3116f9
commit 389526bb80
3 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -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
View File
@@ -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 {
+3 -2
View File
@@ -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;