~loshz/chargectl

71c34d24d36cf22d3fcd4a30fef0a7c0985a870b — Dan Bond 6 months ago 4115de6 v0.1.1
fix assigning_clones bug

Signed-off-by: Dan Bond <danbond@protonmail.com>
3 files changed, 3 insertions(+), 4 deletions(-)

M Cargo.lock
M Cargo.toml
M src/sysfs.rs
M Cargo.lock => Cargo.lock +1 -1
@@ 10,7 10,7 @@ checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"

[[package]]
name = "chargectl"
version = "0.1.0"
version = "0.1.1"
dependencies = [
 "clap",
]

M Cargo.toml => Cargo.toml +1 -1
@@ 1,6 1,6 @@
[package]
name = "chargectl"
version = "0.1.0"
version = "0.1.1"
authors = ["Dan Bond <danbond@protonmail.com>"]
edition = "2021"
rust-version = "1.72"

M src/sysfs.rs => src/sysfs.rs +1 -2
@@ 140,11 140,10 @@ pub fn read_threshold(path: PathBuf) -> Result<u8, Error> {
    // Read threshold into buffer and strip newlines.
    let mut buf = String::new();
    f.read_to_string(&mut buf).map_err(Error::IO)?;
    buf = buf.trim().to_owned();

    // Attempt to parse threshold value.
    // If the OS returns an unparsable value, we should treat this as fatal.
    let threshold = buf.parse::<u8>().unwrap();
    let threshold = buf.trim().parse::<u8>().unwrap();
    Ok(threshold)
}