Skip to content

Commit 10b47f1

Browse files
authored
Merge pull request #1804 from imp/imp/1803-const-action
Make kube::runtime::controller::Action ctors const
2 parents e8ae086 + 7e1ec19 commit 10b47f1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • kube-runtime/src/controller

kube-runtime/src/controller/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl Action {
6969
///
7070
/// Watch events are not normally missed, so running this once per hour (`Default`) as a fallback is reasonable.
7171
#[must_use]
72-
pub fn requeue(duration: Duration) -> Self {
72+
pub const fn requeue(duration: Duration) -> Self {
7373
Self {
7474
requeue_after: Some(duration),
7575
}
@@ -84,7 +84,7 @@ impl Action {
8484
/// It is therefore not recommended to disable requeuing this way, unless you have
8585
/// frequent changes to the underlying object, or some other hook to retain eventual consistency.
8686
#[must_use]
87-
pub fn await_change() -> Self {
87+
pub const fn await_change() -> Self {
8888
Self { requeue_after: None }
8989
}
9090
}

0 commit comments

Comments
 (0)