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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user