version & fixed some clippy linting
This commit is contained in:
@@ -48,6 +48,7 @@ pub fn character_parse
|
||||
data.content = output_string;
|
||||
data.character = character_name;
|
||||
data.choices = vec![];
|
||||
drop(data);
|
||||
},
|
||||
None => return Err(("Unable to read output string".to_string(), sum_index)),
|
||||
}
|
||||
@@ -69,14 +70,14 @@ pub fn character_parse
|
||||
info!("CHANGE command with character {character_name} feature {feature}");
|
||||
let mut characters = characters.lock().expect("Data cannot be unlocked");
|
||||
if let Some(character) = characters.get_mut(&character_name)
|
||||
{
|
||||
if character.set_field(feature, &output_string)
|
||||
.is_err() { warn!("Feature {feature} does not exist") };
|
||||
}
|
||||
&& character.set_field(feature, &output_string)
|
||||
.is_err() { warn!("Feature {feature} does not exist") }
|
||||
drop(characters);
|
||||
let mut data = data_to_send.lock().unwrap(); // TODO eh?
|
||||
data.action_type = String::from("change");
|
||||
data.content = String::new();
|
||||
data.character = character_name;
|
||||
drop(data);
|
||||
},
|
||||
// Catch all condition, if the instruction is unrecognised as a
|
||||
// character command
|
||||
|
||||
Reference in New Issue
Block a user