docs: Fix two code snippets that do not compile (#3955)