I think the refs got it absolutely right with both decisions, Mane red and Ritchie yellow.
Mane was fully aware the keeper was rushing out (obviously - as otherwise he would have waited for the ball to come down). Both players were converging at high speed and raising your foot to head height...