memoryd: the day and the month of a time with get, never a slice

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
2026-09-25 16:41:44 -07:00
parent 1adce5c9df
commit b98f373ead
5 changed files with 6 additions and 10 deletions
+1 -2
View File
@@ -34,8 +34,7 @@ pub struct Note {
/// A time as the notes show it: to the minute, in UTC.
pub fn minute(time: Timestamp) -> String {
let s = time.to_rfc3339();
let head = if s.len() >= 16 { &s[..16] } else { &s };
format!("{head}Z")
format!("{}Z", s.get(..16).unwrap_or(&s))
}
fn class_name(class: DataClass) -> &'static str {