aboutsummaryrefslogtreecommitdiff
path: root/rtic-arbiter/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rtic-arbiter/src/lib.rs')
-rw-r--r--rtic-arbiter/src/lib.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/rtic-arbiter/src/lib.rs b/rtic-arbiter/src/lib.rs
index 09d1b2ee..c70fbf57 100644
--- a/rtic-arbiter/src/lib.rs
+++ b/rtic-arbiter/src/lib.rs
@@ -54,7 +54,8 @@ impl<T> Arbiter<T> {
pub async fn access(&self) -> ExclusiveAccess<'_, T> {
let mut link_ptr: Option<Link<Waker>> = None;
- // Make this future `Drop`-safe, also shadow the original definition so we can't abuse it.
+ // Make this future `Drop`-safe.
+ // SAFETY(link_ptr): Shadow the original definition of `link_ptr` so we can't abuse it.
let mut link_ptr = LinkPtr(&mut link_ptr as *mut Option<Link<Waker>>);
let mut link_ptr2 = link_ptr.clone();
@@ -89,10 +90,13 @@ impl<T> Arbiter<T> {
// Place the link in the wait queue on first run.
let link_ref = link.insert(Link::new(cx.waker().clone()));
- // SAFETY: The address to the link is stable as it is hidden behind
- // `link_ptr`, and `link_ptr` shadows the original making it unmovable.
- self.wait_queue
- .push(unsafe { Pin::new_unchecked(link_ref) });
+ // SAFETY(new_unchecked): The address to the link is stable as it is defined
+ // outside this stack frame.
+ // SAFETY(push): `link_ref` lifetime comes from `link_ptr` that is shadowed,
+ // and we make sure in `dropper` that the link is removed from the queue
+ // before dropping `link_ptr` AND `dropper` makes sure that the shadowed
+ // `link_ptr` lives until the end of the stack frame.
+ unsafe { self.wait_queue.push(Pin::new_unchecked(link_ref)) };
}
Poll::Pending
>/+1 2022-03-12chore(l10n): Update Polish translation (#1997)Gravatar Michał Siemek 1-4/+4 * chore(l10n): Update Polish translation https://github.com/newsboat/newsboat/pull/1986#issuecomment-1062078849 * Update po/pl.po Co-authored-by: Alexander Batischev <eual.jp@gmail.com> 2022-03-12Fixes to UX bugs in Nord colour scheme.Gravatar Daryl Manning 1-9/+10 2022-03-11Make command line options bold/underline in man pagesGravatar Lysander Trischler 2-29/+29 In most other man pages, that I looked at, the program options are formatted bold and their values are underlined. So let's do this, too, to provide an overall consistent look. Also for newsboat's `-x` option in the synopsis the angle brackets around the `command` were removed to make it consistent to all the other options. The space in front of the ellipsis was removed because in the options section there was also no leading space. This also seems to be the common style in most other man pages. 2022-03-10Correction of the last fuzzy stringsGravatar Tonus 1-16/+10 2022-03-09Updated Italian translationGravatar Mauro Scomparin 1-3/+3 2022-03-09Update German translationsGravatar Lysander Trischler 1-3/+3 2022-03-08Update Turkish translationsGravatar Emir SARI 1-7/+7 2022-03-08Update Dutch translationGravatar Dennis van der Schagt 1-4/+4 2022-03-08Update Russian and Ukrainian translationsGravatar Alexander Batischev 2-6/+6 2022-03-08Update .pot and .po filesGravatar Alexander Batischev 19-1136/+1133 2022-03-08Update French translation (#1982)Gravatar Tonus 1-73/+66 2022-03-05Chore(deps): bump actions/checkout from 2.4.0 to 3Gravatar dependabot[bot] 1-1/+1 Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> 2022-03-05Chore(deps): bump once_cell from 1.9.0 to 1.10.0Gravatar dependabot[bot] 2-3/+3 Bumps [once_cell](https://github.com/matklad/once_cell) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/matklad/once_cell/releases) - [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md) - [Commits](https://github.com/matklad/once_cell/compare/v1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: once_cell dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 2022-03-05CI: bump Rust to 1.59.0Gravatar Alexander Batischev 7-17/+16 I had to disable Clippy on macOS because it fails with SIGABRT on Monterey. I found an ostensible workaround[1], but it didn't work for me. Since we're already running Clippy in many other CI jobs, it shouldn't matter much that we don't run it on macOS. 1. https://github.com/rust-lang/cargo/issues/10022#issuecomment-960518609 2022-03-05Verify that crash with double closed <ul> tag is fixedGravatar Dennis van der Schagt 1-0/+14 2022-02-23Chore(deps): bump xdg from 2.4.0 to 2.4.1Gravatar dependabot[bot] 2-5/+5 Bumps [xdg](https://github.com/whitequark/rust-xdg) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/whitequark/rust-xdg/releases) - [Commits](https://github.com/whitequark/rust-xdg/compare/v2.4.0...v2.4.1) --- updated-dependencies: - dependency-name: xdg dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 2022-02-21Guard against popping item from empty vector (list_elements_stack)Gravatar Dennis van der Schagt 1-1/+3 2022-02-21Chore(deps): bump libc from 0.2.118 to 0.2.119Gravatar dependabot[bot] 1-2/+2 Bumps [libc](https://github.com/rust-lang/libc) from 0.2.118 to 0.2.119. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.118...0.2.119) --- updated-dependencies: - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 2022-02-17Chore(deps): bump cxx from 1.0.64 to 1.0.65Gravatar dependabot[bot] 1-6/+6 Bumps [cxx](https://github.com/dtolnay/cxx) from 1.0.64 to 1.0.65. - [Release notes](https://github.com/dtolnay/cxx/releases) - [Commits](https://github.com/dtolnay/cxx/compare/1.0.64...1.0.65) --- updated-dependencies: - dependency-name: cxx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 2022-02-17Chore(deps): bump cxx-build from 1.0.64 to 1.0.65Gravatar dependabot[bot] 1-2/+2 Bumps [cxx-build](https://github.com/dtolnay/cxx) from 1.0.64 to 1.0.65. - [Release notes](https://github.com/dtolnay/cxx/releases) - [Commits](https://github.com/dtolnay/cxx/compare/1.0.64...1.0.65) --- updated-dependencies: - dependency-name: cxx-build dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 2022-02-16Chore(deps): bump libc from 0.2.117 to 0.2.118Gravatar dependabot[bot] 1-2/+2 Bumps [libc](https://github.com/rust-lang/libc) from 0.2.117 to 0.2.118. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.117...0.2.118) --- updated-dependencies: - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 2022-02-03Chore(deps): bump libc from 0.2.116 to 0.2.117Gravatar dependabot[bot] 1-2/+2 Bumps [libc](https://github.com/rust-lang/libc) from 0.2.116 to 0.2.117. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.116...0.2.117) --- updated-dependencies: - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 2022-02-01Actually change the quote on the translated string and not the original ↵Gravatar Roboron3042 1-2/+2 string... 2022-02-01Update language team in po.esGravatar Roboron3042 1-2/+4 Added myself and Marcos Cruz to the translators list 2022-01-31Update po/es.poGravatar Alexander Batischev 1-1/+1 2022-01-31Update ES translationGravatar Roboron3042 1-170/+159 2022-01-31Chore(deps): bump cxx from 1.0.63 to 1.0.64Gravatar dependabot[bot] 1-6/+6 Bumps [cxx](https://github.com/dtolnay/cxx) from 1.0.63 to 1.0.64. - [Release notes](https://github.com/dtolnay/cxx/releases) - [Commits](https://github.com/dtolnay/cxx/compare/1.0.63...1.0.64) --- updated-dependencies: - dependency-name: cxx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 2022-01-31Chore(deps): bump cxx-build from 1.0.63 to 1.0.64Gravatar dependabot[bot] 1-2/+2 Bumps [cxx-build](https://github.com/dtolnay/cxx) from 1.0.63 to 1.0.64. - [Release notes](https://github.com/dtolnay/cxx/releases) - [Commits](https://github.com/dtolnay/cxx/compare/1.0.63...1.0.64) --- updated-dependencies: - dependency-name: cxx-build dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 2022-01-31Chore(deps): bump libc from 0.2.114 to 0.2.116Gravatar dependabot[bot] 1-2/+2 Bumps [libc](https://github.com/rust-lang/libc) from 0.2.114 to 0.2.116. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.114...0.2.116) --- updated-dependencies: - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>