Fix remaining compilation errors
- Fix get_memories_by_priority f32 comparison - Add Datelike import to game_formatter.rs - Add Datelike import to companion.rs All compilation errors should now be resolved.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
use crate::memory::Memory;
|
use crate::memory::Memory;
|
||||||
use crate::game_formatter::{MemoryRarity, DiagnosisType};
|
use crate::game_formatter::{MemoryRarity, DiagnosisType};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc, Datelike};
|
||||||
|
|
||||||
/// コンパニオンキャラクター
|
/// コンパニオンキャラクター
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
use crate::memory::Memory;
|
use crate::memory::Memory;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use chrono::Datelike;
|
||||||
|
|
||||||
/// メモリーのレア度
|
/// メモリーのレア度
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ impl MemoryManager {
|
|||||||
// 優先度順に記憶を取得
|
// 優先度順に記憶を取得
|
||||||
pub fn get_memories_by_priority(&self) -> Vec<&Memory> {
|
pub fn get_memories_by_priority(&self) -> Vec<&Memory> {
|
||||||
let mut memories: Vec<_> = self.memories.values().collect();
|
let mut memories: Vec<_> = self.memories.values().collect();
|
||||||
memories.sort_by(|a, b| b.priority_score.cmp(&a.priority_score));
|
memories.sort_by(|a, b| b.priority_score.partial_cmp(&a.priority_score).unwrap_or(std::cmp::Ordering::Equal));
|
||||||
memories
|
memories
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user