Q:

Avoid space when using mintinline wrapped in a new command

I want to wrap mintinline into a new command \cc but it produces an additional whitespace when using it:
\documentclass{article}

\usepackage{minted}

\newcommand{\cc}[1]{{\mintinline{latex}{#1}}}

\begin{document}

{\mintinline{latex}{\mycommand{argument}}}

\cc{\mycommand{argument}}

\end{document}

Output:

How can I fix this?

A:

The package documentation mentions \newmintinline:
\documentclass{article}

\usepackage{minted}

\newmintinline[cc]{latex}{}

\begin{document}

\mintinline{latex}{\mycommand{argument}}

\cc{\mycommand{argument}}

\end{document}

