mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew
synced 2026-10-11 17:14:30 +08:00
Cleanup compile warnings
This commit is contained in:
@@ -422,17 +422,6 @@ pub fn update_mission_status(master_mission_id: i64, expire: u64, completed: boo
|
||||
None
|
||||
}
|
||||
|
||||
pub fn update_mission_status_multi(master_mission_id: JsonValue, expire: u64, completed: bool, claimed: bool, advance: i64, missions: &mut JsonValue) -> JsonValue {
|
||||
let mut rv = array![];
|
||||
for mission in master_mission_id.members() {
|
||||
let val = update_mission_status(mission.as_i64().unwrap(), expire, completed, claimed, advance, missions);
|
||||
if let Some(val2) = val {
|
||||
rv.push(val2).unwrap();
|
||||
}
|
||||
}
|
||||
rv
|
||||
}
|
||||
|
||||
pub fn get_mission_status(id: i64, missions: &JsonValue) -> JsonValue {
|
||||
for mission in missions.members() {
|
||||
if mission["master_mission_id"].as_i64().unwrap() == id {
|
||||
|
||||
@@ -104,6 +104,7 @@ impl Value {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn as_str(&self) -> Option<&str> {
|
||||
match self {
|
||||
Value::Str(v) => Some(v),
|
||||
@@ -148,6 +149,7 @@ impl Map {
|
||||
self.get(key).and_then(Value::as_int)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn get_str(&self, key: &str) -> Option<&str> {
|
||||
self.get(key).and_then(Value::as_str)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user