forked from janek/mostr
1
0
Fork 0

feat: allow removing property column by index

This commit is contained in:
xeruf 2024-07-25 00:15:20 +03:00
parent 860c3080b2
commit 87cdecbeee
1 changed files with 4 additions and 0 deletions

View File

@ -169,6 +169,10 @@ async fn main() {
Some(':') => match input[1..2].parse::<usize>() { Some(':') => match input[1..2].parse::<usize>() {
Ok(index) => { Ok(index) => {
if input.len() == 2 {
tasks.properties.remove(index);
continue;
}
let value = input[2..].to_string(); let value = input[2..].to_string();
if tasks.properties.get(index) == Some(&value) { if tasks.properties.get(index) == Some(&value) {
tasks.properties.remove(index); tasks.properties.remove(index);