Heat the vegetable oil in a saucepan and add the mustard seeds. As the seeds start to pop you can add the sliced onions. Cook for two to three minutes, then add the garlic.
Cook for a further two to three minutes. Add the remaining spices and cook for another two to three minutes, then add the sugar and vinegar.
Bring to a boil and toss in the leftover carrots. Turn the heat to low and infuse the flavors for 20 minutes. Set aside.