From 71147220276b85a7b89fd4d641dab2bf43c8ed49 Mon Sep 17 00:00:00 2001 From: Devin Jean Date: Mon, 13 Nov 2023 08:33:44 -0600 Subject: [PATCH] update docs --- Cargo.toml | 2 +- src/runtime.rs | 3 +++ src/std_system.rs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5018bae..b50acd2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "netsblox-vm" -version = "0.2.17" +version = "0.2.18" edition = "2021" license = "MIT OR Apache-2.0" authors = ["Devin Jean "] diff --git a/src/runtime.rs b/src/runtime.rs index 38fcc3c..c558267 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -1,3 +1,5 @@ +//! Miscellaneous types representing runtime state. + use alloc::collections::{BTreeMap, BTreeSet, VecDeque}; use alloc::rc::{Rc, Weak}; use alloc::borrow::{Cow, ToOwned}; @@ -132,6 +134,7 @@ impl, S: System> From for ErrorCause { impl, S: System> From for ErrorCause { fn from(error: FromNetsBloxJsonError) -> Self { Self::FromNetsBloxJsonError { error } } } impl, S: System> From for ErrorCause { fn from(error: NumberError) -> Self { Self::NumberError { error } } } +/// A 32-bit RGBA color with color space conversion utils. #[derive(Clone, Copy, PartialEq, Eq, Debug)] pub struct Color { pub r: u8, pub g: u8, pub b: u8, pub a: u8 } impl Color { diff --git a/src/std_system.rs b/src/std_system.rs index 5e19961..c28c524 100644 --- a/src/std_system.rs +++ b/src/std_system.rs @@ -108,7 +108,7 @@ pub struct Clock { cache: Option, } impl Clock { - /// Creates a new [`Clock] with the specified [`UtcOffset`] and (optional) cache [`Precision`] (see [`Clock::read`]). + /// Creates a new [`Clock`] with the specified [`UtcOffset`] and (optional) cache [`Precision`] (see [`Clock::read`]). pub fn new(utc_offset: UtcOffset, cache_precision: Option) -> Self { let mut res = Self { utc_offset, cache: None }; if let Some(precision) = cache_precision {