You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: legacy_args.rs
    path of file: ./repos/azuredatastudio/cli/src/bin/code
    
    the code of the file until where you have to start completion: /*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

use std::collections::HashMap;

use cli::commands::args::{
	CliCore, Commands, Desktop
    
	fn test_parses_user_data_dir_and_extensions_dir() {
		let args = vec![
			"code",
			"--uninstall-extension",
			"connor4312.codesong",
			"--user-data-dir",
			"foo",
			"--extensions-dir",
			"bar",
		];
		let cli = try_parse_legacy(args.into_iter()).unwrap();

		if let Some(Commands::Extension(extension_args)) = cli.subcommand {
			assert_eq!(
				extension_args.desktop_code_options.user_data_dir,
				Some("foo".to_string())
			);
			assert_eq!(
				extension_args.desktop_code_options.extensions_dir,
				Some("bar".to_string())
			);
			if let ExtensionSubcommand::Uninstall(uninstall_args) = extension_args.subcommand {
				assert_eq!(uninstall_args.id, vec!["connor4312.codesong"]);
			} else {
				panic!(
					"Expected uninstall subcommand, got {:?}",
					extension_args.subcommand
				);
			}
		} else {
			panic!("Expected extension subcommand, got {:?}", cli.subcommand);
		}
	}