Skip to content

Conversation

@dimpolo
Copy link
Contributor

@dimpolo dimpolo commented Oct 31, 2022

  • add Send bound
  • move #[must_use] to AppCoreGuard
  • remove redundant -> ()
  • document guard behaviour

The added Send bound is a breaking change but required for soundness.

* add `Send` bound
* move `#[must_use]` to `AppCoreGuard`
* remove redundant `-> ()`
* document guard behaviour
@dimpolo
Copy link
Contributor Author

dimpolo commented Oct 31, 2022

Also, @bjoernQ is there a reason two lifetimes are involved in:

pub fn start_app_core<'a: 'b, 'b>(
        &mut self,
        entry: &'a mut (dyn FnMut() -> () + 'a),
    ) -> Result<AppCoreGuard<'b>, Error> {
    ...
}

It isn't clear to me so I'd like to document it :)

@bjoernQ
Copy link
Contributor

bjoernQ commented Oct 31, 2022

It seems the lifetime 'b isn't really needed anymore. I think I added it at some point during development and forgot about it so you could remove it

@dimpolo
Copy link
Contributor Author

dimpolo commented Oct 31, 2022

Done

Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks a lot for this PR!

@bjoernQ bjoernQ merged commit 9152792 into esp-rs:main Oct 31, 2022
@dimpolo dimpolo deleted the start_app_core_improvements branch November 1, 2022 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants