Violent crime does not rise to the Johannesburg level but is still a problem. Occasional pickpocketing attempts do occur and are almost guaranteed on busy streets. At night, it is better not to walk around alone but you are generally fairly safe in the well-lit areas along Avenida 24 de Julho. Regardless of the hour, be smart when walking around: don't carry much around in the streets with you, and if you have a bag, keep it close to you.
If you have a cell phone, do not flaunt it: pickpockets have been known to take cellphones right out of people's hands while they are talking on them.
The local police are out of control and will target foreigners in the area around popular backpacker hostels, bus stations, etc. Carry a certified copy of your passport not your real one and a copy of your visa too, so that there is no potential problem with the police you are legally obliged to carry both at all times.
Also, very obviously, do not carry drugs or knives penknives around with you at all. One backpacker arriving by bus from Tete was detained and taken to the police station where he was robbed. Do not expect the police station to be a sanctuary if police hassle you. However, if an officer tries to fine you because he believes something is wrong with your passport, demand to be taken to the Chief of Police. He will almost certainly let you go because usually he is only trying to solicit a bribe.