File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -192,13 +192,13 @@ fn convert_string(entry: &Entry) -> String {
192192async fn download_xs_cache ( selected_indexes : HashSet < usize > ) {
193193 let cache = generate_cache ( & selected_indexes) . await ;
194194
195- // Convert the cache data to JSON
196- let json_data = serde_json:: to_string ( & cache) . unwrap ( ) ;
195+ // Convert the cache data to a pretty-printed JSON string
196+ let json_data = serde_json:: to_string_pretty ( & cache) . unwrap ( ) ;
197197
198198 // Create a Blob from the JSON data
199199 let mut blob_options = BlobPropertyBag :: new ( ) ;
200200 blob_options. set_type ( "application/json" ) ;
201-
201+
202202 let blob = Blob :: new_with_str_sequence_and_options (
203203 & Array :: of1 ( & JsValue :: from_str ( & json_data) ) ,
204204 & blob_options,
@@ -216,7 +216,6 @@ async fn download_xs_cache(selected_indexes: HashSet<usize>) {
216216 document. body ( ) . unwrap ( ) . append_child ( & a) . unwrap ( ) ;
217217
218218 // Trigger the download
219-
220219 let a: HtmlElement = a. dyn_into :: < HtmlElement > ( ) . unwrap ( ) ;
221220 a. click ( ) ;
222221
You can’t perform that action at this time.
0 commit comments