File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed
crates/rust-analyzer/src/handlers Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -2039,20 +2039,19 @@ fn to_url(path: VfsPath) -> Option<Url> {
20392039}
20402040
20412041fn resource_ops_supported ( config : & Config , kind : ResourceOperationKind ) -> anyhow:: Result < ( ) > {
2042- let ctn = config
2043- . caps ( )
2044- . workspace
2045- . as_ref ( )
2046- . unwrap ( )
2047- . workspace_edit
2048- . as_ref ( )
2049- . unwrap ( )
2050- . resource_operations
2051- . as_ref ( )
2052- . unwrap ( )
2053- . contains ( & kind) ;
2054-
2055- if !ctn {
2042+ #[ rustfmt:: skip]
2043+ let resops = ( || {
2044+ config
2045+ . caps ( )
2046+ . workspace
2047+ . as_ref ( ) ?
2048+ . workspace_edit
2049+ . as_ref ( ) ?
2050+ . resource_operations
2051+ . as_ref ( )
2052+ } ) ( ) ;
2053+
2054+ if !matches ! ( resops, Some ( resops) if resops. contains( & kind) ) {
20562055 return Err ( LspError :: new (
20572056 ErrorCode :: RequestFailed as i32 ,
20582057 format ! (
You can’t perform that action at this time.
0 commit comments