Bump version to 0.1.1, fix warnings

This commit is contained in:
Stephen Seo 2022-08-11 11:51:12 +09:00
parent 2f5d21751c
commit a9b8e67d58
4 changed files with 5 additions and 2 deletions

2
Cargo.lock generated
View file

@ -141,7 +141,7 @@ dependencies = [
[[package]]
name = "swaybar_info"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"chrono",
"regex",

View file

@ -1,6 +1,6 @@
[package]
name = "swaybar_info"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
description = "Provides swaybar with info to be displayed"
license = "MIT"

View file

@ -82,6 +82,7 @@ impl Default for BattInfo {
}
impl BattInfo {
#[allow(dead_code)]
pub fn is_error_state(&self) -> bool {
self.acpi_error
}

View file

@ -166,6 +166,7 @@ impl SwaybarObject {
self.color = Some("#ff2222ff".to_owned());
}
#[allow(dead_code)]
pub fn set_name(&mut self, name: Option<String>) {
self.name = name;
}
@ -192,6 +193,7 @@ impl SwaybarArray {
self.objects.is_empty()
}
#[allow(dead_code)]
pub fn get_by_name(&self, name: &str) -> Option<&SwaybarObject> {
if let Some(idx) = self.objects_idx_map.get(name) {
return Some(&self.objects[*idx]);