remove exclamation mark from string-program
This commit is contained in:
4
refcell-program/Cargo.toml
Normal file
4
refcell-program/Cargo.toml
Normal file
@ -0,0 +1,4 @@
|
||||
[package]
|
||||
name = "refcell-program"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
9
refcell-program/src/main.rs
Normal file
9
refcell-program/src/main.rs
Normal file
@ -0,0 +1,9 @@
|
||||
use std::cell::RefCell;
|
||||
|
||||
fn main() {
|
||||
let refcell_str: RefCell<&str> = RefCell::new("hello");
|
||||
|
||||
println!("refcell_str");
|
||||
let second = refcell_str.clone();
|
||||
println!("refcell_str second:");
|
||||
}
|
Reference in New Issue
Block a user