We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 847188a commit 43afdf4Copy full SHA for 43afdf4
src/types/on_exit.rs
@@ -64,11 +64,11 @@ impl OnExit {
64
}
65
66
/// Add a request to this OnExit if it is Requests, fail otherwise
67
- pub fn add_request(self, new: Request) -> anyhow::Result<()> {
+ pub fn add_request(&mut self, new: Request) -> anyhow::Result<()> {
68
match self {
69
OnExit::None => Err(anyhow::anyhow!("cannot add request to None")),
70
OnExit::Restart => Err(anyhow::anyhow!("cannot add request to Restart")),
71
- OnExit::Requests(mut reqs) => {
+ OnExit::Requests(ref mut reqs) => {
72
reqs.push(new);
73
Ok(())
74
0 commit comments