Registry testing - part 15

This commit is contained in:
Maurus Decimus
2026-03-25 18:55:39 +01:00
parent 1b5334b65c
commit 0fde3e04fd
20 changed files with 1084 additions and 665 deletions

View File

@@ -153,6 +153,12 @@ impl UTCDateTime {
pub fn is_valid(&self) -> bool {
self.0 != i64::MAX
}
pub fn add_seconds(&mut self, seconds: i64) {
if self.is_valid() {
self.0 += seconds;
}
}
}
impl DateTime {

View File

@@ -18,6 +18,7 @@ use serde::{
ser::SerializeMap,
};
use std::{
borrow::Cow,
fmt::{self, Debug},
marker::PhantomData,
};
@@ -193,7 +194,7 @@ impl<'de, T: Deserialize<'de>> Deserialize<'de> for List<T> {
{
let mut items = VecMap::with_capacity(map.size_hint().unwrap_or(0));
while let Some(key) = map.next_key::<&str>()? {
while let Some(key) = map.next_key::<Cow<str>>()? {
let id: u32 = key
.parse()
.map_err(|_| de::Error::custom(format!("invalid integer key: {key}")))?;