More removal of RwLocks and replace it with Atomics, to prevent locks.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -63,7 +63,7 @@ pub struct ExecutingMove<'own, 'battle, 'library> {
|
||||
number_of_hits: u8,
|
||||
hits: Vec<HitData>,
|
||||
user: Arc<RwLock<Pokemon<'battle, 'library>>>,
|
||||
chosen_move: Arc<RwLock<LearnedMove<'library>>>,
|
||||
chosen_move: Arc<LearnedMove<'library>>,
|
||||
use_move: &'own MoveData,
|
||||
script: ScriptContainer,
|
||||
targets: &'own TargetList<'battle, 'library>,
|
||||
@@ -75,7 +75,7 @@ impl<'own, 'battle, 'library> ExecutingMove<'own, 'battle, 'library> {
|
||||
targets: &'own TargetList<'battle, 'library>,
|
||||
number_of_hits: u8,
|
||||
user: Arc<RwLock<Pokemon<'battle, 'library>>>,
|
||||
chosen_move: Arc<RwLock<LearnedMove<'library>>>,
|
||||
chosen_move: Arc<LearnedMove<'library>>,
|
||||
use_move: &'own MoveData,
|
||||
script: ScriptContainer,
|
||||
) -> Self {
|
||||
@@ -104,7 +104,7 @@ impl<'own, 'battle, 'library> ExecutingMove<'own, 'battle, 'library> {
|
||||
pub fn user(&self) -> &Arc<RwLock<Pokemon<'battle, 'library>>> {
|
||||
&self.user
|
||||
}
|
||||
pub fn chosen_move(&self) -> &Arc<RwLock<LearnedMove<'library>>> {
|
||||
pub fn chosen_move(&self) -> &Arc<LearnedMove<'library>> {
|
||||
&self.chosen_move
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user