Merge pull request #209 from zongzi531/master
feat: add variables solutions
This commit is contained in:
commit
188762ba8f
|
@ -42,6 +42,18 @@ fn define_x() -> String {
|
|||
}
|
||||
```
|
||||
|
||||
```rust
|
||||
fn main() {
|
||||
let x = define_x();
|
||||
println!("{:?}, world", x);
|
||||
}
|
||||
|
||||
fn define_x() -> &'static str {
|
||||
let x = "hello";
|
||||
x
|
||||
}
|
||||
```
|
||||
|
||||
5.
|
||||
```rust
|
||||
fn main() {
|
||||
|
|
Loading…
Reference in New Issue