Skip to content

Commit

Permalink
Add panic headers
Browse files Browse the repository at this point in the history
  • Loading branch information
eholk committed Sep 2, 2022
1 parent 66c3a60 commit 577c7a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ impl<'a, T, const STACK_SIZE: usize> StackFuture<'a, T, { STACK_SIZE }> {
///
/// See the documentation on [`StackFuture`] for examples of how to use this.
///
/// # Panics
///
/// Panics if the requested `StackFuture` is not large enough to hold `future` or we cannot
/// satisfy the alignment requirements for `F`.
pub fn from<F>(future: F) -> Self
Expand All @@ -149,6 +151,8 @@ impl<'a, T, const STACK_SIZE: usize> StackFuture<'a, T, { STACK_SIZE }> {
/// If the `StackFuture` is not large enough to hold `future`, this function returns an
/// `Err` with the argument `future` returned to you.
///
/// Panics
///
/// If we cannot satisfy the alignment requirements for `F`, this function will panic.
pub fn try_from<F>(future: F) -> Result<Self, F>
where
Expand Down

0 comments on commit 577c7a8

Please sign in to comment.