File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11use super :: * ;
2+ use super :: types:: OptionDeref ;
23use crate :: language_client:: LanguageClient ;
34use crate :: lsp:: notification:: Notification ;
45use crate :: lsp:: request:: Request ;
@@ -7,7 +8,7 @@ impl LanguageClient {
78 pub fn handle_call ( & self , msg : Call ) -> Fallible < ( ) > {
89 match msg {
910 Call :: MethodCall ( lang_id, method_call) => {
10- let result = self . handle_method_call ( lang_id . as_deref ( ) , & method_call) ;
11+ let result = self . handle_method_call ( OptionDeref :: as_deref ( & lang_id ) , & method_call) ;
1112 if let Err ( ref err) = result {
1213 if err. find_root_cause ( ) . downcast_ref :: < LCError > ( ) . is_none ( ) {
1314 error ! (
@@ -22,7 +23,7 @@ impl LanguageClient {
2223 . output ( method_call. id . to_int ( ) ?, result) ?;
2324 }
2425 Call :: Notification ( lang_id, notification) => {
25- let result = self . handle_notification ( lang_id . as_deref ( ) , & notification) ;
26+ let result = self . handle_notification ( OptionDeref :: as_deref ( & lang_id ) , & notification) ;
2627 if let Err ( ref err) = result {
2728 if err. downcast_ref :: < LCError > ( ) . is_none ( ) {
2829 error ! (
Original file line number Diff line number Diff line change 11use super :: * ;
2+ use super :: types:: OptionDeref ;
23use crate :: rpcclient:: RpcClient ;
34use crate :: sign:: Sign ;
45use crate :: viewport:: Viewport ;
@@ -148,7 +149,7 @@ impl Vim {
148149
149150 pub fn edit ( & self , goto_cmd : & Option < String > , path : impl AsRef < Path > ) -> Fallible < ( ) > {
150151 let path = path. as_ref ( ) . to_string_lossy ( ) ;
151- let goto = goto_cmd . as_deref ( ) . unwrap_or ( "edit" ) ;
152+ let goto = OptionDeref :: as_deref ( goto_cmd ) . unwrap_or ( "edit" ) ;
152153 self . rpcclient . notify ( "s:Edit" , json ! ( [ goto, path] ) ) ?;
153154 Ok ( ( ) )
154155 }
You can’t perform that action at this time.
0 commit comments