Deprecate LogFile version checks.
This commit is contained in:
@@ -7,23 +7,6 @@ use strum::IntoEnumIterator;
|
|||||||
pub struct LogFile(pub Vec<super::Game>);
|
pub struct LogFile(pub Vec<super::Game>);
|
||||||
|
|
||||||
impl LogFile {
|
impl LogFile {
|
||||||
pub fn min_ver(&self) -> semver::Version {
|
|
||||||
let mut lowest = semver::Version::new(u64::MAX, u64::MAX, u64::MAX);
|
|
||||||
|
|
||||||
self.0.iter().for_each(|x| {
|
|
||||||
if x.version.cmp_precedence(&lowest).is_lt() {
|
|
||||||
lowest = x.version.clone()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
lowest
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns if the LogFile min version is compatible.
|
|
||||||
pub fn is_compatible(&self) -> bool {
|
|
||||||
self.min_ver().cmp_precedence(&crate::MIN_VER).is_lt()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the most common action for a given team.
|
/// Returns the most common action for a given team.
|
||||||
pub fn most_frequent_action(&self, team: Team) -> Action {
|
pub fn most_frequent_action(&self, team: Team) -> Action {
|
||||||
let mut most_common_action = Action::Unknown;
|
let mut most_common_action = Action::Unknown;
|
||||||
|
|||||||
Reference in New Issue
Block a user