Bump version to 0.1.1, fix warnings
This commit is contained in:
parent
2f5d21751c
commit
a9b8e67d58
4 changed files with 5 additions and 2 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -141,7 +141,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "swaybar_info"
|
name = "swaybar_info"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"regex",
|
"regex",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "swaybar_info"
|
name = "swaybar_info"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Provides swaybar with info to be displayed"
|
description = "Provides swaybar with info to be displayed"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
@ -82,6 +82,7 @@ impl Default for BattInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BattInfo {
|
impl BattInfo {
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn is_error_state(&self) -> bool {
|
pub fn is_error_state(&self) -> bool {
|
||||||
self.acpi_error
|
self.acpi_error
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,6 +166,7 @@ impl SwaybarObject {
|
||||||
self.color = Some("#ff2222ff".to_owned());
|
self.color = Some("#ff2222ff".to_owned());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn set_name(&mut self, name: Option<String>) {
|
pub fn set_name(&mut self, name: Option<String>) {
|
||||||
self.name = name;
|
self.name = name;
|
||||||
}
|
}
|
||||||
|
@ -192,6 +193,7 @@ impl SwaybarArray {
|
||||||
self.objects.is_empty()
|
self.objects.is_empty()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn get_by_name(&self, name: &str) -> Option<&SwaybarObject> {
|
pub fn get_by_name(&self, name: &str) -> Option<&SwaybarObject> {
|
||||||
if let Some(idx) = self.objects_idx_map.get(name) {
|
if let Some(idx) = self.objects_idx_map.get(name) {
|
||||||
return Some(&self.objects[*idx]);
|
return Some(&self.objects[*idx]);
|
||||||
|
|
Loading…
Reference in a new issue