Projects STRLCPY jscythe Commits 7bd1b049
🤬
  • ■ ■ ■ ■ ■ ■
    src/main.rs
    skipped 257 lines
    258 258   if let Some(ref poll_command) = args.poll_command {
    259 259   println!("passing variable value to {} ...", poll_command);
    260 260   Command::new(poll_command)
    261  - .arg(&result.result.result.value)
     261 + .arg(&result.result.result.value.unwrap_or("".to_owned()))
    262 262   .spawn()
    263 263   .unwrap()
    264 264   .wait()
    265 265   .unwrap();
    266 266   } else {
    267  - println!("{}", result.result.result.value);
     267 + println!("{}", result.result.result.value.unwrap_or("".to_owned()));
    268 268   }
    269 269   } else {
    270 270   println!("got non text message: {:?}", resp);
    skipped 9 lines
  • ■ ■ ■ ■
    src/protocol.rs
    skipped 104 lines
    105 105   pub(crate) struct Result {
    106 106   // #[serde(rename(deserialize = "type"))]
    107 107   // pub rtype: String,
    108  - pub value: String,
     108 + pub value: Option<String>,
    109 109   }
    110 110   
    111 111   #[derive(Deserialize)]
    skipped 53 lines
Please wait...
Page is in error, reload to recover