You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flowchart LR
A["Source<br/>[1,2,3,4,5]"] -->|.iter\(\)| B["Iterator"]
B -->|.filter\(\|x\| x%2==0\)| C["[2, 4]"]
C -->|.map\(\|x\| x*x\)| D["[4, 16]"]
D -->|.collect\(\)| E["Vec<i32><br/>[4, 16]"]
style A fill:#ffeeba
style E fill:#d4edda
Loading
Solution
I would like to propose this solution for the fix
flowchart LR
A["Source<br/>[1,2,3,4,5]"] -->|".iter()"| B["Iterator"]
B -->|".filter(|x| x%2==0)"| C["[2, 4]"]
C -->|".map(|x| x*x)"| D["[4, 16]"]
D -->|".collect()"| E["Vec<i32><br/>[4, 16]"]
style A fill:#ffeeba
style E fill:#d4edda
flowchart LR
A["Source<br/>[1,2,3,4,5]"] -->|".iter()"| B["Iterator"]
B -->|".filter(|x| x%2==0)"| C["[2, 4]"]
C -->|".map(|x| x*x)"| D["[4, 16]"]
D -->|".collect()"| E["Vec<i32><br/>[4, 16]"]
style A fill:#ffeeba
style E fill:#d4edda
Description
The mermaid diagram under
Comprehensions vs Iterator Chainsis showing this error :Also seen on site
Actual code
flowchart LR A["Source<br/>[1,2,3,4,5]"] -->|.iter\(\)| B["Iterator"] B -->|.filter\(\|x\| x%2==0\)| C["[2, 4]"] C -->|.map\(\|x\| x*x\)| D["[4, 16]"] D -->|.collect\(\)| E["Vec<i32><br/>[4, 16]"] style A fill:#ffeeba style E fill:#d4eddaSolution
I would like to propose this solution for the fix
flowchart LR A["Source<br/>[1,2,3,4,5]"] -->|".iter()"| B["Iterator"] B -->|".filter(|x| x%2==0)"| C["[2, 4]"] C -->|".map(|x| x*x)"| D["[4, 16]"] D -->|".collect()"| E["Vec<i32><br/>[4, 16]"] style A fill:#ffeeba style E fill:#d4eddaPlease let me know what you think