buffer: remove unneeded copy in nearest sampler