mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-29 09:30:20 +02:00
Fix comment in Rust docs: box -> mine (#2365)
The "box" is referring to the Box variable a few lines back, but that is called "mine", not "box".
This commit is contained in:
@@ -286,7 +286,7 @@ fn main() {
|
||||
var = 3;
|
||||
let ref_var: &i32 = &var;
|
||||
|
||||
println!("{}", var); // Unlike `box`, `var` can still be used
|
||||
println!("{}", var); // Unlike `mine`, `var` can still be used
|
||||
println!("{}", *ref_var);
|
||||
// var = 5; // this would not compile because `var` is borrowed
|
||||
// *ref_var = 6; // this would not either, because `ref_var` is an immutable reference
|
||||
|
Reference in New Issue
Block a user