But public safety is more than worries about being violently attacked. If you have someone passed out on a narrow sidewalk, you then have to walk into the street to get past them: that's unsafe, and even worse for people with mobility issues. If someone relieves themself in a public space or throws away needles on the street, that's a matter of hygiene and disease.
And although opioid users aren't going to be violent, there are other drugs. Am I allowed to be concerned for my own safety when someone is smoking meth on the bus?