Skip to content

Commit 9feffad

Browse files
committed
Fix definition of AsmOption::value_field_offset
More lenient with lifetimes now and accepts a reference. Bump version to 0.1.2
1 parent c9c12d8 commit 9feffad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "static-reflect"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
edition = "2018"
55
description = "Static type information, giving a form of compile-time reflection"
66
license = "MIT"

src/builtins.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl AsmOption<()> {
128128
///
129129
/// This should be equal to the type's alignment
130130
#[inline]
131-
pub const fn value_field_offset(element_type: TypeInfo<'static>) -> usize {
131+
pub const fn value_field_offset(element_type: &TypeInfo<'_>) -> usize {
132132
element_type.alignment()
133133
}
134134
}

0 commit comments

Comments
 (0)