mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-06 18:59:19 +00:00
Refactor struct Book to use lifetimes
This commit is contained in:
parent
2432fde73d
commit
edd6b3eb49
@ -5,11 +5,9 @@
|
|||||||
// Execute `rustlings hint lifetimes3` or use the `hint` watch subcommand for a
|
// Execute `rustlings hint lifetimes3` or use the `hint` watch subcommand for a
|
||||||
// hint.
|
// hint.
|
||||||
|
|
||||||
// I AM NOT DONE
|
struct Book<'a> {
|
||||||
|
author: &'a str,
|
||||||
struct Book {
|
title: &'a str,
|
||||||
author: &str,
|
|
||||||
title: &str,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user