Apply suggestions from code review
Apply suggestions from code review

Co-authored-by: Ivan Tham <1caaae66ad2b6814584001fdaa761fdc4f6b3dff@riseup.net>

graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust