I was in Pesaro and Rimini, I think that's close enough. Going to San Marino just means climbing a mountain. Plus, I'd probably need my passport or something. I'm sure it's not worth it.
There are no frontier formalities between Italy an San Marino: anyone visiting Italy with a visa can enter freely. As for being not worth it... well, I can't agree.
There are no passport controls, but to be honest, except for getting the "country point" or buying tax free cigarettes, there's not a hell of a lot to do there imo (but I only spent half an afternoon there also, so maybe I totally missed everything interesting).
As with other gorgeous places, the point is not about
doing something, it's about
being there.

And if you are a sword enthusiast (I am), San Marino is a candy shop: gorgeous replicas of Medieval and Renaissance swords, not to mention the world-famous crossbows.