Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion example-build/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright 2022 Oxide Computer Company
// Copyright 2025 Oxide Computer Company

#![allow(clippy::derivable_impls)]

// Include the generated code.
include!(concat!(env!("OUT_DIR"), "/codegen.rs"));
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.85.0"
channel = "1.89.0"
profile = "default"
6 changes: 3 additions & 3 deletions typify-impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ impl TypeSpace {
}

/// Get a type given its ID.
pub fn get_type(&self, type_id: &TypeId) -> Result<Type> {
pub fn get_type(&self, type_id: &TypeId) -> Result<Type<'_>> {
let type_entry = self.id_to_entry.get(type_id).ok_or(Error::InvalidTypeId)?;
Ok(Type {
type_space: self,
Expand Down Expand Up @@ -824,7 +824,7 @@ impl TypeSpace {

/// Iterate over all types including those defined in this [TypeSpace] and
/// those referred to by those types.
pub fn iter_types(&self) -> impl Iterator<Item = Type> {
pub fn iter_types(&self) -> impl Iterator<Item = Type<'_>> {
self.id_to_entry.values().map(move |type_entry| Type {
type_space: self,
type_entry,
Expand Down Expand Up @@ -1033,7 +1033,7 @@ impl Type<'_> {
}

/// Get details about the type.
pub fn details(&self) -> TypeDetails {
pub fn details(&self) -> TypeDetails<'_> {
match &self.type_entry.details {
// Named user-defined types
TypeEntryDetails::Enum(details) => TypeDetails::Enum(TypeEnum { details }),
Expand Down
6 changes: 5 additions & 1 deletion typify-test/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Oxide Computer Company
// Copyright 2025 Oxide Computer Company

// Include the generated code to make sure it compiles.
include!(concat!(env!("OUT_DIR"), "/codegen.rs"));
Expand Down Expand Up @@ -57,6 +57,8 @@ fn test_unknown_format() {
}

mod hashmap {
#![allow(dead_code)]

include!(concat!(env!("OUT_DIR"), "/codegen_hashmap.rs"));

#[test]
Expand All @@ -69,6 +71,8 @@ mod hashmap {
}

mod custom_map {
#![allow(dead_code)]

#[allow(private_interfaces)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct CustomMap<K, V> {
Expand Down
Loading