4 ms·
Yes, but note that if you do that the parameter has to be constant, you can't do foo.windows::<runtime_expr>()
by gpm 6y ago
Yes, but note that if you do that the parameter has to be constant, you can't do foo.windows::<runtime_expr>()
- throwaway894345 6y agoYeah, that's fine. I'm making a static site generator and I want each post to have optional links to the next and previous posts, so something like: let pages = posts.windows::<3>().map(|[prev, this, next]| Page { item: this, prev: Some(to_url(prev)), next: Some(to_url(next)), }); // then attach first and last pages