Skip to content

Commit eb963d7

Browse files
committed
fix: borrow error
1 parent 7c2b24d commit eb963d7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/wasm/src/meta.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::{
1313
util::path_exists,
1414
};
1515

16-
#[derive(serde::Serialize, Debug)]
16+
#[derive(serde::Serialize, Clone, Copy, Debug)]
1717
pub enum InstallStatus {
1818
Bundled,
1919
Manual,
@@ -140,7 +140,7 @@ pub fn get_navigation_data_install_status(task: Rc<RefCell<Task>>) {
140140
None => None,
141141
};
142142

143-
let status = NavigationDataStatus {
143+
let navigation_data_status = NavigationDataStatus {
144144
status,
145145
installed_format: match &installed_cycle_info {
146146
Some(installed_cycle_info) => Some(installed_cycle_info.format.clone()),
@@ -166,15 +166,13 @@ pub fn get_navigation_data_install_status(task: Rc<RefCell<Task>>) {
166166
latest_cycle: response_struct.cycle,
167167
};
168168

169-
let status_as_value = match serde_json::to_value(&status) {
169+
let status_as_value = match serde_json::to_value(&navigation_data_status) {
170170
Ok(status_as_value) => status_as_value,
171171
Err(e) => {
172172
task.borrow_mut().status = TaskStatus::Failure(e.to_string());
173173
return;
174174
},
175175
};
176176

177-
println!("Status: {:#?}", status);
178-
179177
task.borrow_mut().status = TaskStatus::Success(Some(status_as_value));
180178
}

0 commit comments

Comments
 (0)