Traverse the file tree #1
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is the actual first item: log out the file tree. We can bake in the auth here, and break it out later.
Libraries we'll need:
Sketch | Iteration
Handling the Option
In the loop, we need to advance the loop counter every time, the question is whether we do anything else. If we encounter a
None
, we should be able to ignore it & move on, but I'm not sure how to implement that.Fixing incompatible match arms
Theyre just that: incompatible. An assignment statement returns the unit type
()
. A hash map insertion returnsOption(V)
. So the latter needs to be inside a block that returns the unit type. The block can go on one line.Great blog post on matching structs.
You cant mutably borrow something after youve immutably borrowed it. Try
mut Vec
declaration again.Maybe try taking out the
Options
, just to simplify the code. That should eliminate the immutable borrowings inmatch
armsAlso do I have to call functions from
traverse
to handle immutable borrowings? and leavetraverse
purely mutable?I've misunderstood ETags. The ETag of the first folder (test_public) is the same as that of its last item (2021_test_public), so the latter is not visited.
Logs of a recent run are in the scratchpad folder.
ETag is more like a timestamp.
Use href or clone of it.