Skip to content

Commit d6dde2d

Browse files
authored
fix: remove unneccesary static bound (#244)
1 parent d6d85d8 commit d6dde2d

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Remove unnecessary `'static` bound on `InitFn` (#244)
1013

1114
## [0.24.0] - 2025-09-04
1215

star_frame/src/account_set/account.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ where
315315
impl<T: ProgramAccount + UnsizedType + ?Sized, InitArg, InitFn> CanInitAccount<InitFn>
316316
for Account<T>
317317
where
318-
InitFn: FnOnce() -> InitArg + 'static,
318+
InitFn: FnOnce() -> InitArg,
319319
T: UnsizedInit<InitArg>,
320320
{
321321
fn init_account<const IF_NEEDED: bool>(
@@ -335,7 +335,7 @@ impl<T: ProgramAccount + UnsizedType + ?Sized, InitArg, Funder, InitFn>
335335
CanInitAccount<(InitFn, &Funder)> for Account<T>
336336
where
337337
T: UnsizedInit<InitArg>,
338-
InitFn: FnOnce() -> InitArg + 'static,
338+
InitFn: FnOnce() -> InitArg,
339339
Funder: CanFundRent + ?Sized,
340340
{
341341
fn init_account<const IF_NEEDED: bool>(

star_frame/src/account_set/borsh_account.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ where
257257

258258
impl<T, InitFn> CanInitAccount<InitFn> for BorshAccount<T>
259259
where
260-
InitFn: FnOnce() -> T + 'static,
260+
InitFn: FnOnce() -> T,
261261
T: BorshDeserialize + BorshSerialize + ProgramAccount,
262262
{
263263
#[inline]
@@ -291,7 +291,7 @@ where
291291

292292
impl<T, Funder, InitValue> CanInitAccount<(InitValue, &Funder)> for BorshAccount<T>
293293
where
294-
InitValue: FnOnce() -> T + 'static,
294+
InitValue: FnOnce() -> T,
295295
T: BorshDeserialize + BorshSerialize + ProgramAccount,
296296
Funder: CanFundRent + ?Sized,
297297
{

0 commit comments

Comments
 (0)