mut_immut

Crates.iomut_immut
lib.rsmut_immut
version0.2.1
sourcesrc
created_at2022-05-30 01:01:57.28861
updated_at2022-05-30 10:06:47.759036
descriptionChange value of an immutable variable.
homepage
repositoryhttps://github.com/mrMiiao/mut_immut
max_upload_size
id596720
size2,217
(mrMiiao)

documentation

README

crates.io License Documentation

mut_immut

Change value of an immutable variable!!!

Examples:

extern crate mut_immut;
use mut_immut::change;

fn main() {
    let a: u8 = 6;
    change(&a, 255);
    println!("{a}"); // >> 255
}
extern crate mut_immut;
use mut_immut::*;

fn main() {
    let a: u8 = 15;
    let mut mut_a = get_mut(&a);
    *mut_a = 8;
    println!("{a}"); // >> 8
}
Commit count: 0

cargo fmt