-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
For example, we have the following code in dstate:
fn get_state(path: &Path) -> Result<String, DStateError> {
let mut stat_path = path.to_path_buf();
stat_path.push("stat");
let line = read_to_string_single(&stat_path)?;
let fields: Vec<_> = line.split_whitespace().collect();
Ok(fields
.get(2)
.ok_or(DStateError::InvalidStatFile)?
.to_string())
}With some code changes, we should allow passing:
#[filestruct(parser = get_state)]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels