Skip to content

Commit b0957d3

Browse files
committed
allow keyfor trivial bounds
1 parent 6c3a340 commit b0957d3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

framework/star_frame/src/data_types/key_for.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ impl<T: ?Sized> From<Pubkey> for KeyFor<T> {
8282
}
8383

8484
// Safety: `KeyFor` is a transparent wrapper around a `Pubkey` which is `Zeroable`
85+
#[allow(trivial_bounds)]
8586
unsafe impl<T: ?Sized> Zeroable for KeyFor<T>
8687
where
8788
Pubkey: Zeroable,
@@ -94,6 +95,7 @@ where
9495
}
9596
}
9697
// Safety: `KeyFor` is a transparent wrapper around a `Pubkey` which is `Pod`
98+
#[allow(trivial_bounds)]
9799
unsafe impl<T: 'static + ?Sized> Pod for KeyFor<T> where Pubkey: Pod {}
98100

99101
#[cfg(feature = "idl")]

framework/star_frame/src/data_types/optional_key_for.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ impl<T: 'static + ?Sized> From<KeyFor<T>> for OptionalKeyFor<T> {
140140
}
141141

142142
// Safety: `OptionalKeyFor` is a transparent wrapper around a `Pubkey` which is `Zeroable`
143+
#[allow(trivial_bounds)]
143144
unsafe impl<T: ?Sized> Zeroable for OptionalKeyFor<T>
144145
where
145146
Pubkey: Zeroable,
@@ -152,6 +153,7 @@ where
152153
}
153154
}
154155
// Safety: `OptionalKeyFor` is a transparent wrapper around a `Pubkey` which is `Pod`
156+
#[allow(trivial_bounds)]
155157
unsafe impl<T: 'static + ?Sized> Pod for OptionalKeyFor<T> where Pubkey: Pod {}
156158

157159
#[cfg(feature = "idl")]

0 commit comments

Comments
 (0)