I guess this is an old post, but as you said you're going to Brazil in October, I think there's still time to talk about that...
Well, in fact, I am brazilian, Rio de Janeiro. And I have to say, it's very good to see how the international community thinks about my birthplace. Let me make clear that I do not get offended by any negative portrait about Brazil. I'm NOT a political person (I do not care anymore

) and it is not my nature to defend it or anything... I'm really neutral about everything.
So, Cindy said something very interesting.. I can say by my own experience living here that people from here tend to be more transphobic against transwomen.
Example: I see see a transwoman at bus stop, everybody near is looking with a bad face or making bad jokes between them.
I see a transman in a bus stop, transphobia is still there, but is diferent. No one care too much, they don't look at you with bad faces... I see a lot of women or transman who wear man's clothing and no one care. (I really wish it was the same for transwomen...

) This is a truth at big cities... If you go to a more "interior" areas (iterior?? I don't know if this is the correct word) you will encounter a LOT of people who is homophobic/transphobic... etc. "interior" I mean state of Acre, Amazonas, Goiás... This is explained by the fact that education about these things are a little slow, because the folks are more traditional.
About being a tourist... It's a bit hard to accept what I'll say but, a tourist is likely to be assaulted. But, there are some "secrets" that you need to know. Knowing this I think you will be ok not only in brazil but anywhere you go.
Be yourself! Don't try to "diguise" as a local, because everyone WILL notice that and everybody will know you're not a local, and of course, the thief is among "them".
When walking at streets, pay attention all the time for your surroundings. When I say "all the time" I'm saying "do this like paranoid" lol the reason for this is what others already said about tourist areas. Here is WAY different from Japan for example, where you can walk at peace... Do not show valuables when just walking.. If you're going to a place more formal it's ok. Do not walk with cellphone in hand.. if you need to use it go to a restricted area...(good luck trying to take pics...

)
What I'm about to say next is somehow complicated, because it's a matter of prejudgement. You'll likely to encounter some people that are not the same "type" of the whole. Example: you're walking the street and everyone is wearing some type of cloth... you learned the pattern... and then someone is not fitting... (recaling the paranoid advise lol) just for example, let's supose this one is shoeless when everyone is with shoes, sandals, flip flop... whatever... this one is probably an enemy and you (or anyone near, but the paranoid mode is on) are likely to be a target. If you see someone troubled walking your way, cross the street. The reason for that is.. if you just turn around and go back, the thief will reach you in no time, and maybe this troubled person is a thief, maybe not... if you turn your back to someone just because they is wearing poor clothes, you're automatically saying this one is a criminal, when the person could be simply poor (you're ruining his hard day like this). If you cross the street and this one cross with you, so you ARE in danger... do whatever you like.. (I would freak real bad... lol).
Just for the record, I already have the abilitty to say if someone is a possible danger or not... I don't know if this is because I live here for a long time already, but.. here it goes... When I see a poor person more calm/passive this person is not a threat at all, but when I see a poor person more active, vigorous/agressive way of walking.. I think this one is ready for a "run"...
About the swim trunks.. you will find no trouble regarding this... not at all.
I don't know where you'll come from but october is a reasonable time to come.. it's spring here at this time of year, so you will face no high temperatures... I really hope you enjoy your trip.