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