mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-31 12:04:43 +00:00 
			
		
		
		
	fix format
This commit is contained in:
		
							parent
							
								
									f66a3413db
								
							
						
					
					
						commit
						0c13a94533
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		|  | @ -304,12 +304,18 @@ export const isWindows = process.platform === "win32"; | ||||||
| 
 | 
 | ||||||
| export function isWindowsDriveLetter(code: number): boolean { | export function isWindowsDriveLetter(code: number): boolean { | ||||||
|     // Copied from https://github.com/microsoft/vscode/blob/02c2dba5f2669b924fd290dff7d2ff3460791996/src/vs/base/common/extpath.ts#L265-L267
 |     // Copied from https://github.com/microsoft/vscode/blob/02c2dba5f2669b924fd290dff7d2ff3460791996/src/vs/base/common/extpath.ts#L265-L267
 | ||||||
|     return code >= /* CharCode.A */ 65 && code <= /* CharCode.Z */ 90 || code >= /* CharCode.a */ 97 && code <= /* CharCode.z */ 122; |     return ( | ||||||
|  |         (code >= /* CharCode.A */ 65 && code <= /* CharCode.Z */ 90) || | ||||||
|  |         (code >= /* CharCode.a */ 97 && code <= /* CharCode.z */ 122) | ||||||
|  |     ); | ||||||
| } | } | ||||||
| export function hasDriveLetter(path: string, isWindowsOS: boolean = isWindows): boolean { | export function hasDriveLetter(path: string, isWindowsOS: boolean = isWindows): boolean { | ||||||
|     // Copied from https://github.com/microsoft/vscode/blob/02c2dba5f2669b924fd290dff7d2ff3460791996/src/vs/base/common/extpath.ts#L324-L330
 |     // Copied from https://github.com/microsoft/vscode/blob/02c2dba5f2669b924fd290dff7d2ff3460791996/src/vs/base/common/extpath.ts#L324-L330
 | ||||||
|     if (isWindowsOS) { |     if (isWindowsOS) { | ||||||
|         return isWindowsDriveLetter(path.charCodeAt(0)) && path.charCodeAt(1) === /* CharCode.Colon */ 58; |         return ( | ||||||
|  |             isWindowsDriveLetter(path.charCodeAt(0)) && | ||||||
|  |             path.charCodeAt(1) === /* CharCode.Colon */ 58 | ||||||
|  |         ); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return false; |     return false; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Clouds Flowing
						Clouds Flowing