Get the latest tech news
Creating an empty iterator of a certain type in Rust (2018)
I am working these days on the development of offset's Index server. I needed to implement a basic directed graph structure, allowing to run the BFS algorithm to find routes with a certain amount of capacity.
I needed to implement a basic directed graph structure, allowing to run the BFS algorithm to find routes with a certain amount of capacity. The details about the send and receive capacities are not very relevant to the discussion here, but I felt obligated to explain the non matching numbers in the example above. This is a working solution, however, note that we allocate a vector every time we call this function, and where is the fun in using Rust if we don't have zero cost abstractions?
Or read this on Hacker News