Skip to content

Commit

Permalink
Make CommitmentLevel constructors const (solana-labs#27367)
Browse files Browse the repository at this point in the history
make CommitmentLevel constructors const
  • Loading branch information
fhartwig authored Aug 31, 2022
1 parent 2e7dc64 commit 12f9213
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdk/src/commitment_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ impl CommitmentConfig {
}
}

pub fn finalized() -> Self {
pub const fn finalized() -> Self {
Self {
commitment: CommitmentLevel::Finalized,
}
}

pub fn confirmed() -> Self {
pub const fn confirmed() -> Self {
Self {
commitment: CommitmentLevel::Confirmed,
}
}

pub fn processed() -> Self {
pub const fn processed() -> Self {
Self {
commitment: CommitmentLevel::Processed,
}
Expand Down

0 comments on commit 12f9213

Please sign in to comment.