I once put a wet gun away in a carrying case. The gun eventually developed some rust. Should I replace the foam inside the case to eliminate the chance of rusting on any of my other guns?
Yes, I would replace the foam. Realistically it may be ok to store in a case bearing rust however iron has two valance states when oxidized of +2 and +3 when the atom gives up electrons. It you place iron metal next to rust the containing ferric +3 will want to grab an electron from the metal and be reduce to Ferrous +2 and oxidize oxidize the metal to a ferrous rust . We etched copper in the same manner using ionized copper salts in solution where copper has two valence states. We called it a slow etch solution when the copper metal would etch via the electron shuttle method over several hours as oppose to a rapid nitric acid etch. Chemistry is replete wit these type of shuttle reactions and generally all it requires an a little moisture. some atmospheric moisture will do, and a extra electron scavenger where in you case it's oxygen. Replacing the foam would be the wise thing to do.
Don't tell SidebySide. I charge his a fee for such information.
The faster I go, the older I get.
"I am with you Flintsy ." SidebySide
Flintlok, I think you're dead right....."The Dogge"
" when an American comes on the forum .....and then gets a bit upperty ..."
I would replace your case and use vp90 pads in your gun safe, they are brilliant at absorbing moisture and also add a microscopic layer of protection to your guns, completely metal and wood safe,