1 2 3 4 5 6 7 8 9 10 11 12 13
use crate::db::Uuid; use crate::{Error, Result}; /// Performs checks on the UUID. /// /// Returns [Error] on check failure. pub fn check_uuid(key: &str, uuid: &Uuid) -> Result<()> { if uuid.is_nil() { Err(Error::sql(format!("{key}: nil UUID"))) } else { Ok(()) } }