Skip to content

Commit

Permalink
docs: added little comment about crutial decisition in snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
luisnquin committed Feb 24, 2024
1 parent cbc3c9a commit 6b50dab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ fn main() {

info!("current capacity: {} Status: {}", capacity, status);

// This double check is necessary to don't perform the same action repeated times
if status == "Charging" && last_notification_level != BatteryNotificationLevel::Charging {
info!("now the battery is charging...");
info!(
Expand Down

0 comments on commit 6b50dab

Please sign in to comment.