Rollup merge of #50726 - udoprog:read2-inner-fn, r=alexcrichton
Rollup merge of #50726 - udoprog:read2-inner-fn, r=alexcrichton

read2: Use inner function instead of closure

Very minor thing, but there doesn't appear to be a reason to use a closure here.

Generated code is identical in my tests, but I believe it's clearer that nothing from the environment is being used.

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