@@ -59,7 +59,7 @@ impl LanguageState {
59
59
pub fn clear_cache ( & mut self , _arguments : Vec < JsonValue > ) -> AnySchedulableResponse {
60
60
comemo:: evict ( 0 ) ;
61
61
self . primary ( ) . clear_cache ( ) ;
62
- just_ok ! ( JsonValue :: Null )
62
+ just_ok ( JsonValue :: Null )
63
63
}
64
64
65
65
/// Pin main file to some path.
@@ -70,7 +70,7 @@ impl LanguageState {
70
70
update_result. map_err ( |err| internal_error ( format ! ( "could not pin file: {err}" ) ) ) ?;
71
71
72
72
log:: info!( "file pinned: {entry:?}" ) ;
73
- just_ok ! ( JsonValue :: Null )
73
+ just_ok ( JsonValue :: Null )
74
74
}
75
75
76
76
/// Focus main file to some path.
@@ -88,7 +88,7 @@ impl LanguageState {
88
88
if ok {
89
89
log:: info!( "file focused: {entry:?}" ) ;
90
90
}
91
- just_ok ! ( JsonValue :: Null )
91
+ just_ok ( JsonValue :: Null )
92
92
}
93
93
94
94
/// Start a preview instance.
@@ -168,7 +168,7 @@ impl LanguageState {
168
168
169
169
let snap = self . primary ( ) . snapshot ( ) . map_err ( z_internal_error) ?;
170
170
171
- just_future ! ( async move {
171
+ just_future ( async move {
172
172
let snap = snap. snapshot ( ) . await . map_err ( z_internal_error) ?;
173
173
174
174
// Parse the package specification. If the user didn't specify the version,
@@ -213,7 +213,7 @@ impl LanguageState {
213
213
214
214
let snap = self . primary ( ) . snapshot ( ) . map_err ( z_internal_error) ?;
215
215
216
- just_future ! ( async move {
216
+ just_future ( async move {
217
217
let snap = snap. snapshot ( ) . await . map_err ( z_internal_error) ?;
218
218
219
219
// Parse the package specification. If the user didn't specify the version,
@@ -282,19 +282,21 @@ impl LanguageState {
282
282
let snap = self . primary ( ) . snapshot ( ) . map_err ( z_internal_error) ?;
283
283
let user_action = self . user_action ;
284
284
285
- just_future ! ( async move {
285
+ just_future ( async move {
286
286
let snap = snap. snapshot ( ) . await . map_err ( z_internal_error) ?;
287
+ let display_entry = || format ! ( "{entry:?}" ) ;
287
288
288
289
// todo: rootless file
289
290
// todo: memory dirty file
290
- let root = entry. root( ) . ok_or_else(
291
- || error_once!( "root must be determined for trace, got" , entry: format!( "{entry:?}" ) ) ,
292
- ) . map_err( z_internal_error) ?;
291
+ let root = entry
292
+ . root ( )
293
+ . ok_or_else ( || error_once ! ( "root must be determined for trace, got" , entry: display_entry( ) ) )
294
+ . map_err ( z_internal_error) ?;
293
295
let main = entry
294
296
. main ( )
295
297
. and_then ( |e| e. vpath ( ) . resolve ( & root) )
296
298
. ok_or_else (
297
- || error_once!( "main file must be resolved, got" , entry: format! ( "{entry:?}" ) ) ,
299
+ || error_once ! ( "main file must be resolved, got" , entry: display_entry ( ) ) ,
298
300
)
299
301
. map_err ( z_internal_error) ?;
300
302
@@ -338,13 +340,13 @@ impl LanguageState {
338
340
/// Get the all valid symbols
339
341
pub fn resource_symbols ( & mut self , _arguments : Vec < JsonValue > ) -> AnySchedulableResponse {
340
342
let snapshot = self . primary ( ) . snapshot ( ) . map_err ( z_internal_error) ?;
341
- just_future ! ( Self :: get_symbol_resources( snapshot) )
343
+ just_future ( Self :: get_symbol_resources ( snapshot) )
342
344
}
343
345
344
346
/// Get resource preview html
345
347
pub fn resource_preview_html ( & mut self , _arguments : Vec < JsonValue > ) -> AnySchedulableResponse {
346
348
let resp = serde_json:: to_value ( TYPST_PREVIEW_HTML ) ;
347
- just_result ! ( resp. map_err( |e| internal_error( e. to_string( ) ) ) )
349
+ just_result ( resp. map_err ( |e| internal_error ( e. to_string ( ) ) ) )
348
350
}
349
351
350
352
/// Get tutorial web page
0 commit comments