Why are you emphasising "safe rust"?! Pandoc is written in Haskell not C. There's nothing to make safer here. For all we know you might have made it less safe.