feat: enable removing column by index
This commit is contained in:
parent
ab28cf4fd7
commit
72af6bfd61
1 changed files with 6 additions and 1 deletions
|
@ -104,7 +104,12 @@ async fn main() {
|
||||||
|
|
||||||
Some(':') => match input[1..2].parse::<usize>() {
|
Some(':') => match input[1..2].parse::<usize>() {
|
||||||
Ok(index) => {
|
Ok(index) => {
|
||||||
tasks.properties.insert(index, input[2..].to_string());
|
let value = input[2..].to_string();
|
||||||
|
if tasks.properties.get(index) == Some(&value) {
|
||||||
|
tasks.properties.remove(index);
|
||||||
|
} else {
|
||||||
|
tasks.properties.insert(index, value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
let prop = &input[1..];
|
let prop = &input[1..];
|
||||||
|
|
Loading…
Add table
Reference in a new issue