There was an error while loading. Please reload this page.
2 parents e0d2916 + 2c221b0 commit 9de4863Copy full SHA for 9de4863
2 files changed
rust/routee-compass-core/src/model/state/state_model.rs
@@ -110,7 +110,7 @@ impl StateModel {
110
self.0.is_empty()
111
}
112
113
- pub fn contains_key(&self, k: &String) -> bool {
+ pub fn contains_key(&self, k: &str) -> bool {
114
self.0.contains_key(k)
115
116
rust/routee-compass-powertrain/src/model/charging/battery/model.rs
@@ -20,7 +20,7 @@ impl ConstraintModel for BatteryFilter {
20
state: &[StateVariable],
21
state_model: &StateModel,
22
) -> Result<bool, ConstraintModelError> {
23
- if !state_model.contains_key(&fieldname::TRIP_SOC.to_string()) {
+ if !state_model.contains_key(fieldname::TRIP_SOC) {
24
// if we don't have the trip_soc, then this frontier is valid
25
return Ok(true);
26
0 commit comments