Skip to content

Latest commit

 

History

History

local_ref_cell

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

local_ref_cell

What it does

Checks for local variables that are RefCells.

Why is this bad?

There is rarely a need for a locally declared RefCell.

Example

let x = RefCell::<usize>::new(0);

Use instead:

let mut x: usize = 0;