From 1bed2ab9951f9bd48cd63ecc94aaf69980720f4c Mon Sep 17 00:00:00 2001 From: Kunal Bagaria Date: Mon, 12 Dec 2022 23:02:44 +0530 Subject: [PATCH] bump: version --- Cargo.toml | 2 +- src/start.rs | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 806e2c7..0624d51 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ repository = "https://github.com/kb24x7/rustyvibes" keywords = ["mechanical", "keyboard", "keypress", "keyboard", "sound"] categories = ["command-line-utilities"] license = "MIT OR Apache-2.0" -version = "1.0.8" +version = "1.0.9" edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/start.rs b/src/start.rs index 29ef761..5eb2f86 100644 --- a/src/start.rs +++ b/src/start.rs @@ -5,21 +5,21 @@ pub mod rustyvibes { use serde_json::{Map, Value}; use std::error::Error; use std::fs; - + pub use crate::keycode::key_code; pub use crate::play_sound::sound; - + fn initialize_json(path: &str) -> Result, Box> { let config = fs::read_to_string(path)?; let parsed: Value = serde_json::from_str(&config)?; let obj: Map = parsed.as_object().unwrap().clone(); Ok(obj) } - + pub struct JSONFile { pub value: Option>, } - + impl JSONFile { pub fn initialize(&mut self, directory: String) { let soundpack_config = &format!("{}/config.json", directory)[..]; @@ -36,7 +36,7 @@ pub mod rustyvibes { } } } - + pub fn start_rustyvibes(args: String, vol: u16) { { #[cfg(any(target_os = "macos", target_os = "linux"))] @@ -68,13 +68,13 @@ pub mod rustyvibes { println!("Error: {:?}", error) } } - + use once_cell::sync::Lazy; use std::collections::HashSet; use std::sync::Mutex; - + static KEY_DEPRESSED: Lazy>> = Lazy::new(|| Mutex::new(HashSet::new())); - + fn callback(event: Event, json_file: serde_json::Map, directory: String, vol: u16) { match event.event_type { rdev::EventType::KeyPress(key) => { @@ -108,4 +108,4 @@ pub mod rustyvibes { _ => (), } } -} +} \ No newline at end of file