mirror of
https://codeberg.org/YGGverse/psocks.git
synced 2026-04-01 00:45:27 +00:00
return old status on change
This commit is contained in:
parent
b93c1e8481
commit
abeeae2f16
2 changed files with 4 additions and 2 deletions
|
|
@ -34,8 +34,10 @@ impl List {
|
|||
})
|
||||
}
|
||||
/// Change rule set status by list ID
|
||||
pub fn set_status(&mut self, is_enabled: bool) {
|
||||
pub fn set_status(&mut self, is_enabled: bool) -> bool {
|
||||
let was_enabled = self.is_enabled;
|
||||
self.is_enabled = is_enabled;
|
||||
was_enabled
|
||||
}
|
||||
/// Check if rule is exist in the items index
|
||||
pub fn contains(&self, value: &str) -> bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue