It uses an unsafe code block.
https://github.com/jedisct1/yes-rs/blob/main/src/main.rs#L12...
It also appears to log other stuff than y.
The uutils rewrite of yes into rust doesn't use unsafe and is much simpler.
https://github.com/uutils/coreutils/blob/main/src/uu/yes/src...