Skip to content

Commit

Permalink
feat(oracle): Added const modifier to methods
Browse files Browse the repository at this point in the history
  • Loading branch information
KirilMihaylov authored and Gancho Manev committed May 25, 2023
1 parent 0c33fe2 commit 216279b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/oracle/src/contract/alarms/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ where
I: Iterator<Item = PriceResult<BaseC>>,
BaseC: Currency,
{
pub fn new(alarms: &'alarms PriceAlarms<'storage, S>, price_iter: I) -> Self {
pub const fn new(alarms: &'alarms PriceAlarms<'storage, S>, price_iter: I) -> Self {
Self {
alarms,
price_iter,
Expand Down
5 changes: 4 additions & 1 deletion contracts/oracle/src/contract/alarms/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ where
}
}

pub fn notify_alarms_iter<I, BaseC>(&self, prices: I) -> AlarmsIter<'storage, '_, S, I, BaseC>
pub const fn notify_alarms_iter<I, BaseC>(
&self,
prices: I,
) -> AlarmsIter<'storage, '_, S, I, BaseC>
where
I: Iterator<Item = PriceResult<BaseC>>,
BaseC: Currency,
Expand Down

0 comments on commit 216279b

Please sign in to comment.