Fixes for newer Rust nightly
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
0a4d44646c
commit
27b0a460ad
|
@ -62,7 +62,7 @@ enum-display-derive = "0.1.1"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
csv = "1.1.6"
|
csv = "1.1.6"
|
||||||
project-root = "0.2.2"
|
project-root = "0.2.2"
|
||||||
datatest = "0.7.1"
|
datatest = { git = "https://github.com/Deukhoofd/datatest.git" }
|
||||||
serde_yaml = "0.9.14"
|
serde_yaml = "0.9.14"
|
||||||
serde_json = "1.0.81"
|
serde_json = "1.0.81"
|
||||||
serde_plain = "1.0.0"
|
serde_plain = "1.0.0"
|
||||||
|
|
|
@ -600,7 +600,7 @@ impl Pokemon {
|
||||||
|
|
||||||
/// Whether or not the Pokemon is on the battlefield.
|
/// Whether or not the Pokemon is on the battlefield.
|
||||||
pub fn is_on_battlefield(&self) -> bool {
|
pub fn is_on_battlefield(&self) -> bool {
|
||||||
self.battle_data.read().is_some_and(|a| a.on_battle_field())
|
self.battle_data.read().as_ref().is_some_and(|a| a.on_battle_field())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Marks an opponent as seen, for use in experience gain.
|
/// Marks an opponent as seen, for use in experience gain.
|
||||||
|
@ -636,7 +636,7 @@ impl Pokemon {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if self.battle_data.read().is_some_and(|a| a.on_battle_field()) {
|
if self.battle_data.read().as_ref().is_some_and(|a| a.on_battle_field()) {
|
||||||
script_hook!(on_damage, self, self, source, self.current_health(), new_health);
|
script_hook!(on_damage, self, self, source, self.current_health(), new_health);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -302,7 +302,7 @@ impl ScriptContainer {
|
||||||
|
|
||||||
/// Get the internal script. Note that this can only be None if the script was marked for deletion.
|
/// Get the internal script. Note that this can only be None if the script was marked for deletion.
|
||||||
pub fn get(&self) -> Option<&ScriptHolder> {
|
pub fn get(&self) -> Option<&ScriptHolder> {
|
||||||
if self.script.read().is_some_and(|a| a.is_marked_for_deletion()) {
|
if self.script.read().as_ref().is_some_and(|a| a.is_marked_for_deletion()) {
|
||||||
if !self.script.is_locked() {
|
if !self.script.is_locked() {
|
||||||
self.script.write().take();
|
self.script.write().take();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
#![feature(once_cell)]
|
#![feature(once_cell)]
|
||||||
#![feature(const_option)]
|
#![feature(const_option)]
|
||||||
#![feature(is_some_with)]
|
#![feature(is_some_and)]
|
||||||
#![feature(new_uninit)]
|
#![feature(new_uninit)]
|
||||||
#![feature(get_mut_unchecked)]
|
#![feature(get_mut_unchecked)]
|
||||||
#![feature(strict_provenance)]
|
#![feature(strict_provenance)]
|
||||||
|
|
Loading…
Reference in New Issue