Arduino digital pin in OUTPUT mode have low impedance, is it safe to limit current through two leds (connected to two output pins) with one resistor, not two (knowing that leds will go dim and current will decrease when both diodes will be on (I'm not going to turn them on at the same time anyway)). Does led diode protect pin from sinking current (when pin is LOW)?
There's two circuits on simulation, right is right way to limit current, and left is "wrong" way to do it, center switch closes first circuit and opens second and vice versa. Left and right switch changes level of second pin from HIGH to LOW. Resistor near current source simulates low impedance of power source.