You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lazy::new(|| Mutex::new(DatabaseState::new().unwrap()));// SAFETY: the only way this function can return an error is if layout.json is corrupt (which is impossible since the package wouldn't even mount), or if copying to the work folder is failing (in which case we have more fundamental problems). So overall, unwrapping here is safe
56
-
57
-
/// An entry in the layout.json file
58
-
#[derive(Deserialize)]
59
-
structLayoutEntry{
60
-
path:String,
61
-
}
62
-
63
-
/// The representation of the layout.json file
64
-
#[derive(Deserialize)]
65
-
structLayoutJson{
66
-
content:Vec<LayoutEntry>,
67
-
}
53
+
Lazy::new(|| Mutex::new(DatabaseState::new().unwrap()));// SAFETY: the only way this function can return an error is if there is an IO error which is impossible unless the user has messed up work folder permissions (which would make interface not work anyways)
Path::new(&format!(".\\{BUNDLED_FOLDER_NAME}\\{cycle_info}")),// We need to reconstruct the bundled path to include the proper syntax to reference non-work folder files
Path::new(&format!(".\\{BUNDLED_FOLDER_NAME}\\{cycle_file_name}")),// We need to reconstruct the bundled path to include the proper syntax to reference non-work folder files
// Drain any pending reports. We need to structure it like this as opposed to just a top level `let Ok(state) = ...`` due to the fact we should not be holding a MutexGuard across an await point
0 commit comments