cli: use hard tabs to align with vscode style

This commit is contained in:
Connor Peet
2022-09-23 14:17:01 -07:00
parent 665eb030a6
commit b784bcdd32
43 changed files with 5942 additions and 5944 deletions

View File

@@ -90,7 +90,6 @@
"[rust]": { "[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer", "editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.insertSpaces": true
}, },
"typescript.tsc.autoDetect": "off", "typescript.tsc.autoDetect": "off",
"testing.autoRun.mode": "rerun", "testing.autoRun.mode": "rerun",

View File

@@ -3,7 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
const FILE_HEADER: &str = "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/"; const FILE_HEADER: &str = "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/";
use std::{env, fs, io, path::PathBuf, process}; use std::{env, fs, io, path::PathBuf, process};

1
cli/rustfmt.toml Normal file
View File

@@ -0,0 +1 @@
hard_tabs = true

View File

@@ -12,8 +12,8 @@ pub mod log;
pub mod commands; pub mod commands;
pub mod desktop; pub mod desktop;
pub mod options; pub mod options;
pub mod tunnels;
pub mod state; pub mod state;
pub mod tunnels;
pub mod update; pub mod update;
pub mod update_service; pub mod update_service;
pub mod util; pub mod util;

View File

@@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved. * Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
use crate::constants::{CONTROL_PORT, VSCODE_CLI_VERSION, PROTOCOL_VERSION}; use crate::constants::{CONTROL_PORT, PROTOCOL_VERSION, VSCODE_CLI_VERSION};
use crate::log; use crate::log;
use crate::state::LauncherPaths; use crate::state::LauncherPaths;
use crate::update::Update; use crate::update::Update;

View File

@@ -472,8 +472,7 @@ impl DevTunnels {
.as_ref() .as_ref()
.and_then(|s| s.host_connection_count.as_ref()) .and_then(|s| s.host_connection_count.as_ref())
.map(|c| c.get_count()) .map(|c| c.get_count())
.unwrap_or(0) .unwrap_or(0) == 0
== 0
}) })
.choose(&mut rand::thread_rng()); .choose(&mut rand::thread_rng());