mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Get read lock when retrieving general messages
Now that the Database::general_messages() function takes &self instead of &mut self, the wrappers don't need to take a write lock to call it.
This commit is contained in:
@@ -120,7 +120,7 @@ impl Database {
|
||||
evaluate_conditions: bool,
|
||||
) -> Result<Vec<Message>, VerboseError> {
|
||||
self.0
|
||||
.write()
|
||||
.read()
|
||||
.map_err(DatabaseLockPoisonError::from)?
|
||||
.general_messages(to_eval_mode(evaluate_conditions))
|
||||
.map(|v| v.into_iter().map(Into::into).collect())
|
||||
|
||||
Reference in New Issue
Block a user