In short, no, it's fine to use. It can be a risk if Leptospirosis (Weil's disease) is common in your area, but the risk, whilst low, is to you, not your vegetables. Rats commonly carry weil's disease, but mice can too. When handling your compost, wear gloves (something you should always do anyway) and spread out or incorporate into the soil. Any possible, surviving bacteria will quickly reduce and die, and will not affect your vegetables. Leptospiro like wet conditions, so putting your compost onto soil is fine, as is growing vegetables in soil treated with your compost. http://www.allotment-garden.org/composts-fertilisers/composting-making-compost/rats-in-the-compost-heap-weils-disease-safety-concerns/