fix: client_key is a string
This commit is contained in:
parent
afaa397a52
commit
60121a01c2
@ -101,7 +101,7 @@ impl RedisCtrl {
|
||||
|
||||
pub fn init_world_state( &mut self) -> LJResult<WorldState>{
|
||||
Ok(WorldState {
|
||||
client_key: self.connection.get("/clientkey")?,
|
||||
client_key: self.get_client_key()?,
|
||||
edh: self.get_edh()?,
|
||||
kpps: self.get_int("kpps")?.try_into()?,
|
||||
intensity: self.get_int("intensity")?.try_into()?,
|
||||
@ -118,9 +118,9 @@ impl RedisCtrl {
|
||||
Ok(edh)
|
||||
}
|
||||
|
||||
pub fn get_client_key( &mut self ) -> LJResult<u8> {
|
||||
let key : u8 = self.connection.get("/clientkey")?;
|
||||
Ok(key as u8)
|
||||
pub fn get_client_key( &mut self ) -> LJResult<String> {
|
||||
let key : String = self.connection.get("/clientkey")?;
|
||||
Ok(key)
|
||||
}
|
||||
|
||||
pub fn get_int(&mut self, key: &str ) -> LJResult<u32> {
|
||||
|
@ -40,7 +40,7 @@ impl EDH {
|
||||
pub struct WorldState {
|
||||
pub edh: EDH,
|
||||
pub resampler: Vec<f32>,
|
||||
pub client_key: u8,
|
||||
pub client_key: String,
|
||||
pub intensity: u8,
|
||||
pub kpps: u32,
|
||||
pub color: Color,
|
||||
|
Loading…
Reference in New Issue
Block a user