Also changes a bunch of places to use references to Cids instead of returning or taking by value. Cid implements Copy which means there might a lot of silent copying happening under the hood without it being obvious from the code, and since Cids can be larger than a memory address, using references where possible seems prudent. Have that change split into its own commit if you want to see the changes separately. Can also split into two PRs if preferred.
Also changes a bunch of places to use references to Cids instead of returning or taking by value. Cid implements Copy which means there might a lot of silent copying happening under the hood without it being obvious from the code, and since Cids can be larger than a memory address, using references where possible seems prudent. Have that change split into its own commit if you want to see the changes separately. Can also split into two PRs if preferred.