refactor: move resource/IO root modules under io/

Relocate three root-level modules into io/, where they belong by concern:

- update_check.rs -> io/update_check.rs (its own doc-comment notes it
  mirrors how crate::io wraps blocking calls in async).
- patterns.rs, linetypes.rs -> io/ (standard resource catalogs parsed
  from asset files and populated into the document — IO-shaped work).

Fix the moved files' include_str! paths (one level deeper), add the
mod declarations to io/mod.rs, drop them from lib.rs/main.rs, and
re-point all crate:: references to crate::io::. No behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-26 23:06:40 +03:00
1 parent bbdbd0850b
commit 415dbe08d4
15 files changed
+18 -21

No files matched your search

+1 -1
View File
@@ -341,7 +341,7 @@ pub(super) fn on_open_file(&mut self) -> Task<Message> {
self.tabs[i].scene.selected = rustc_hash::FxHashSet::default();
self.tabs[i].scene.preview_wires = vec![];
self.tabs[i].scene.current_layout = "Model".to_string();
crate::linetypes::populate_document(&mut self.tabs[i].scene.document);
crate::io::linetypes::populate_document(&mut self.tabs[i].scene.document);
self.tabs[i].properties = PropertiesPanel::empty();
// Seed the current table / multileader style from the file's
// header so the ✓ marks the right one (text/dim/mline come from
+2 -2
View File
@@ -537,7 +537,7 @@ impl OpenCADStudio {
let i = self.active_tab;
self.push_undo_snapshot(i, "CLEAR");
self.tabs[i].scene.clear();
crate::linetypes::populate_document(&mut self.tabs[i].scene.document);
crate::io::linetypes::populate_document(&mut self.tabs[i].scene.document);
self.tabs[i].properties = PropertiesPanel::empty();
let doc_layers = self.tabs[i].scene.document.layers.clone();
let vp_info = self.tabs[i].scene.viewport_list();
@@ -2449,7 +2449,7 @@ impl OpenCADStudio {
Task::none()
}
Message::UpdateNoticeOpenRelease => {
crate::sys::open_url(crate::update_check::RELEASES_PAGE);
crate::sys::open_url(crate::io::update_check::RELEASES_PAGE);
self.close_active_modal();
Task::none()
}