Crates.io | borrowfix |
lib.rs | borrowfix |
version | 0.1.4 |
source | src |
created_at | 2022-02-10 22:16:47.72224 |
updated_at | 2022-02-10 23:11:05.772372 |
description | A fix for all you borrow checker problems |
homepage | |
repository | https://github.com/10maurycy10/borrowfix |
max_upload_size | |
id | 530477 |
size | 3,040 |
note: This crate is a joke and under no circumstance should you actually use it (unless you want your stuff to break)
Is the borrow checker getting in your way?
This crate fixes that.
without borrow-fix:
fn printit(s :String) {
println!("{}",s);
}
let s = String::new();
printit(s);
println!("s is {}",s); // Wont compile :(
with borrow-fix:
use borrowfix::remember;
fn printit(s :String) {
println!("{}",s);
}
let s = String::new();
let refer = remember(&s);
printit(s);
println!("refer is {}",refer); // Works fine
As this crate uses fully safe code. It wont causÊÃúý$HOME/projects/borrowf[SEGMENTATION FAULT]