Use new format strings.

This commit is contained in:
Nolan Darilek 2022-01-19 16:38:32 -06:00
parent a214206caf
commit c0980f66c1
3 changed files with 4 additions and 4 deletions

View File

@ -471,7 +471,7 @@ pub trait PointLike {
} else {
self.direction(other).into()
};
tokens.push(format!("{} {} {}", direction, distance, tile_or_tiles));
tokens.push(format!("{direction} {distance} {tile_or_tiles}"));
}
tokens.join(" ")
}

View File

@ -468,9 +468,9 @@ fn area_description(
};
if let Some(name) = name {
if event.intersecting {
log.push(format!("Entering {}.", name));
log.push(format!("Entering {name}."));
} else {
log.push(format!("Leaving {}.", name));
log.push(format!("Leaving {name}."));
}
}
}

View File

@ -390,7 +390,7 @@ fn log_visible(
let yaw = Angle::Radians(forward.y.atan2(forward.x));
let location =
viewer_coordinates.direction_and_distance(&viewed_coordinates, Some(yaw));
log.push(format!("{}: {}", **name, location));
log.push(format!("{}: {location}", **name));
}
} else if let VisibilityChanged::Lost { viewed, .. } = event {
recently_lost.insert(*viewed, Timer::from_seconds(2., false));