From 040976497749aaa02d54e125ce2b34300213bfb0 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Tue, 9 Dec 2025 16:51:14 -0500 Subject: [Rust] New type for `TypeArchiveId` Prevents type confusions considering there are at times, three different id types being referred to in the type archive API --- rust/tests/type_archive.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rust/tests') diff --git a/rust/tests/type_archive.rs b/rust/tests/type_archive.rs index 7f0bd2f0..12fcec9d 100644 --- a/rust/tests/type_archive.rs +++ b/rust/tests/type_archive.rs @@ -23,4 +23,8 @@ fn test_create_archive() { .expect("Found test type"); assert_eq!(test_type.width(), 7); assert_eq!(test_type.type_class(), TypeClass::IntegerTypeClass); + + let lookup_type_archive = + TypeArchive::lookup_by_id(&type_archive.id()).expect("Failed to lookup type archive"); + assert_eq!(lookup_type_archive, type_archive); } -- cgit v1.3.1