generated from GarandPLG/rust-flake-template
Refactor DiggingTask and embed it in Tasks enum
- Remove lifetime and path storage from DiggingTask, make it Copy. - Add a placeholder `new` constructor that accepts a path. - Update the Tasks enum to hold a DiggingTask value. - Reorder module declarations and re‑export order for tasks. - Add a commented‑out tasks field to MinerUnit as a preparation step.
This commit is contained in:
1 parent
1c0f27f115
commit
644d8648b2
4 files changed
+19
-7
No files matched your search
@@ -1,6 +1,14 @@
|
||||
use crate::app::widgets::CellWidget;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct DiggingTask<'a> {
|
||||
path: Vec<&'a CellWidget>,
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct DiggingTask {
|
||||
// path: Vec<(usize, usize)>,
|
||||
}
|
||||
|
||||
impl DiggingTask {
|
||||
pub fn new(path: Vec<(u16, u16)>) -> Self {
|
||||
Self {
|
||||
// path
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user