wip: converting generate_tags to return an iterator

This commit is contained in:
Max Brunsfeld 2020-03-10 11:45:31 -07:00
parent 157258d881
commit 0eb162c685
2 changed files with 60 additions and 25 deletions

View file

@ -27,9 +27,10 @@ fn test_tags_javascript() {
.unwrap();
let mut tag_context = TagsContext::new();
let tags = tag_context.generate_tags(
&tags_config,
br#"
let tags = tag_context
.generate_tags(
&tags_config,
br#"
class Customer:
'''
Data about a customer
@ -42,7 +43,8 @@ fn test_tags_javascript() {
compute_age(self.id);
}
"#,
);
)
.collect::<Vec<_>>();
assert_eq!(
tags.iter().map(|t| (t.name, t.kind)).collect::<Vec<_>>(),