File tree Expand file tree Collapse file tree
services/files/electron-browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,21 +95,15 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport
9595 return null ;
9696 }
9797
98- let description : string ;
9998 switch ( verbosity ) {
10099 case Verbosity . SHORT :
101- description = this . shortDescription ;
102- break ;
100+ return this . shortDescription ;
103101 case Verbosity . LONG :
104- description = this . longDescription ;
105- break ;
102+ return this . longDescription ;
106103 case Verbosity . MEDIUM :
107104 default :
108- description = this . mediumDescription ;
109- break ;
105+ return this . mediumDescription ;
110106 }
111-
112- return description ;
113107 }
114108
115109 @memoize
Original file line number Diff line number Diff line change @@ -221,27 +221,20 @@ export class RemoteFileService extends FileService {
221221 if ( ! match ) {
222222 return undefined ;
223223 }
224- let res : FileOperationResult ;
225224 switch ( match [ 1 ] ) {
226225 case 'EntryNotFound' :
227- res = FileOperationResult . FILE_NOT_FOUND ;
228- break ;
226+ return FileOperationResult . FILE_NOT_FOUND ;
229227 case 'EntryIsADirectory' :
230- res = FileOperationResult . FILE_IS_DIRECTORY ;
231- break ;
228+ return FileOperationResult . FILE_IS_DIRECTORY ;
232229 case 'NoPermissions' :
233- res = FileOperationResult . FILE_PERMISSION_DENIED ;
234- break ;
230+ return FileOperationResult . FILE_PERMISSION_DENIED ;
235231 case 'EntryExists' :
236- res = FileOperationResult . FILE_MOVE_CONFLICT ;
237- break ;
232+ return FileOperationResult . FILE_MOVE_CONFLICT ;
238233 case 'EntryNotADirectory' :
239234 default :
240235 // todo
241- res = undefined ;
242- break ;
236+ return undefined ;
243237 }
244- return res ;
245238 }
246239
247240 // --- stat
You can’t perform that action at this time.
0 commit comments