mirl 9.2.0

Miners Rust Lib - A massive collection of ever growing and changing functions, structs, and enums. Check the description for compatibility and toggleable features! (Most of the lib is controlled by flags/features so the lib can continue to be lightweight despite its size)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![allow(clippy::inline_always)]
use super::Buffer;
impl Buffer {
    #[inline(always)]
    /// Set the pixel at the specified position, it'll check if the pixel is in bounds for you
    pub const fn set_pixel_safe(&mut self, xy: (usize, usize), color: u32) {
        crate::render::draw_pixel_safe(self, xy, color);
    }
    #[inline(always)]
    /// Set the pixel at the specified position without checking if it is within the allowed memory
    pub const fn set_pixel_unsafe(&mut self, xy: (usize, usize), color: u32) {
        crate::render::draw_pixel_unsafe(self, xy, color);
    }
}