Merge pull request #338 from shenshouer/patch-8

Update too-long1.md
pull/342/head
Sunface 3 years ago committed by GitHub
commit 5ea36a61fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -141,7 +141,8 @@ struct List<'text> {
} }
impl<'text> List<'text> { impl<'text> List<'text> {
pub fn get_interface<'manager>(&'manager mut self) -> Interface<'text, 'manager> { pub fn get_interface<'manager>(&'manager mut self) -> Interface<'text, 'manager>
where 'text: 'manager {
Interface { Interface {
manager: &mut self.manager manager: &mut self.manager
} }
@ -167,4 +168,4 @@ fn main() {
fn use_list(list: &List) { fn use_list(list: &List) {
println!("{}", list.manager.text); println!("{}", list.manager.text);
} }
``` ```

Loading…
Cancel
Save