from typing import MutableMapping
from typing import Optional


def extract_project_name(content: MutableMapping) -> Optional[str]:
    """
    Extract the Cargo project name from the Cargo.toml file.

    :param content: The Cargo.toml parsed dictionnary
    :returns: The project name, otherwise None
    """
    try:
        return content["package"]["name"]
    except KeyError:
        return None