Skip to content

Commit b41a10e

Browse files
committed
Fix documentation (docs.rs) and release 2.1.2
1 parent f179158 commit b41a10e

File tree

8 files changed

+34
-28
lines changed

8 files changed

+34
-28
lines changed

rtic-macros/CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!
77

88
## [Unreleased]
99

10-
- Replace `proc-macro-error` with `proc-macro-error2`
10+
## [v2.1.1] - 2024-12-06
1111

1212
### Changed
1313

14+
- Replace `proc-macro-error` with `proc-macro-error2`
1415
- Fix codegen emitting unqualified `Result`
1516
- Improve error output for prios > dispatchers
1617

rtic-macros/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ name = "rtic-macros"
2222
readme = "../README.md"
2323
repository = "https://github.com/rtic-rs/rtic"
2424

25-
version = "2.1.0"
25+
version = "2.1.1"
2626

2727
[lib]
2828
proc-macro = true

rtic-sync/src/arbiter.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ pub struct ExclusiveAccess<'a, T> {
161161
inner: &'a mut T,
162162
}
163163

164-
impl<'a, T> Drop for ExclusiveAccess<'a, T> {
164+
impl<T> Drop for ExclusiveAccess<'_, T> {
165165
fn drop(&mut self) {
166166
critical_section::with(|_| {
167167
fence(Ordering::SeqCst);
@@ -177,15 +177,15 @@ impl<'a, T> Drop for ExclusiveAccess<'a, T> {
177177
}
178178
}
179179

180-
impl<'a, T> Deref for ExclusiveAccess<'a, T> {
180+
impl<T> Deref for ExclusiveAccess<'_, T> {
181181
type Target = T;
182182

183183
fn deref(&self) -> &Self::Target {
184184
self.inner
185185
}
186186
}
187187

188-
impl<'a, T> DerefMut for ExclusiveAccess<'a, T> {
188+
impl<T> DerefMut for ExclusiveAccess<'_, T> {
189189
fn deref_mut(&mut self) -> &mut Self::Target {
190190
self.inner
191191
}
@@ -215,15 +215,15 @@ pub mod spi {
215215
}
216216
}
217217

218-
impl<'a, BUS, CS, D> ErrorType for ArbiterDevice<'a, BUS, CS, D>
218+
impl<BUS, CS, D> ErrorType for ArbiterDevice<'_, BUS, CS, D>
219219
where
220220
BUS: ErrorType,
221221
CS: OutputPin,
222222
{
223223
type Error = DeviceError<BUS::Error, CS::Error>;
224224
}
225225

226-
impl<'a, Word, BUS, CS, D> SpiDevice<Word> for ArbiterDevice<'a, BUS, CS, D>
226+
impl<Word, BUS, CS, D> SpiDevice<Word> for ArbiterDevice<'_, BUS, CS, D>
227227
where
228228
Word: Copy + 'static,
229229
BUS: SpiBus<Word>,
@@ -338,14 +338,14 @@ pub mod i2c {
338338
}
339339
}
340340

341-
impl<'a, BUS> ErrorType for ArbiterDevice<'a, BUS>
341+
impl<BUS> ErrorType for ArbiterDevice<'_, BUS>
342342
where
343343
BUS: ErrorType,
344344
{
345345
type Error = BUS::Error;
346346
}
347347

348-
impl<'a, BUS, A> I2c<A> for ArbiterDevice<'a, BUS>
348+
impl<BUS, A> I2c<A> for ArbiterDevice<'_, BUS>
349349
where
350350
BUS: I2c<A>,
351351
A: AddressMode,

rtic-sync/src/channel.rs

+15-12
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ macro_rules! make_channel {
127127

128128
// SAFETY: This is safe as we hide the static mut from others to access it.
129129
// Only this point is where the mutable access happens.
130-
unsafe { CHANNEL.split() }
130+
#[allow(static_mut_refs)]
131+
unsafe {
132+
CHANNEL.split()
133+
}
131134
}};
132135
}
133136

@@ -184,7 +187,7 @@ where
184187
/// A `Sender` can send to the channel and can be cloned.
185188
pub struct Sender<'a, T, const N: usize>(&'a Channel<T, N>);
186189

187-
unsafe impl<'a, T, const N: usize> Send for Sender<'a, T, N> {}
190+
unsafe impl<T, const N: usize> Send for Sender<'_, T, N> {}
188191

189192
/// This is needed to make the async closure in `send` accept that we "share"
190193
/// the link possible between threads.
@@ -202,20 +205,20 @@ unsafe impl Send for LinkPtr {}
202205

203206
unsafe impl Sync for LinkPtr {}
204207

205-
impl<'a, T, const N: usize> core::fmt::Debug for Sender<'a, T, N> {
208+
impl<T, const N: usize> core::fmt::Debug for Sender<'_, T, N> {
206209
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
207210
write!(f, "Sender")
208211
}
209212
}
210213

211214
#[cfg(feature = "defmt-03")]
212-
impl<'a, T, const N: usize> defmt::Format for Sender<'a, T, N> {
215+
impl<T, const N: usize> defmt::Format for Sender<'_, T, N> {
213216
fn format(&self, f: defmt::Formatter) {
214217
defmt::write!(f, "Sender",)
215218
}
216219
}
217220

218-
impl<'a, T, const N: usize> Sender<'a, T, N> {
221+
impl<T, const N: usize> Sender<'_, T, N> {
219222
#[inline(always)]
220223
fn send_footer(&mut self, idx: u8, val: T) {
221224
// Write the value to the slots, note; this memcpy is not under a critical section.
@@ -360,7 +363,7 @@ impl<'a, T, const N: usize> Sender<'a, T, N> {
360363
}
361364
}
362365

363-
impl<'a, T, const N: usize> Drop for Sender<'a, T, N> {
366+
impl<T, const N: usize> Drop for Sender<'_, T, N> {
364367
fn drop(&mut self) {
365368
// Count down the reference counter
366369
let num_senders = critical_section::with(|cs| {
@@ -376,7 +379,7 @@ impl<'a, T, const N: usize> Drop for Sender<'a, T, N> {
376379
}
377380
}
378381

379-
impl<'a, T, const N: usize> Clone for Sender<'a, T, N> {
382+
impl<T, const N: usize> Clone for Sender<'_, T, N> {
380383
fn clone(&self) -> Self {
381384
// Count up the reference counter
382385
critical_section::with(|cs| *self.0.access(cs).num_senders += 1);
@@ -390,16 +393,16 @@ impl<'a, T, const N: usize> Clone for Sender<'a, T, N> {
390393
/// A receiver of the channel. There can only be one receiver at any time.
391394
pub struct Receiver<'a, T, const N: usize>(&'a Channel<T, N>);
392395

393-
unsafe impl<'a, T, const N: usize> Send for Receiver<'a, T, N> {}
396+
unsafe impl<T, const N: usize> Send for Receiver<'_, T, N> {}
394397

395-
impl<'a, T, const N: usize> core::fmt::Debug for Receiver<'a, T, N> {
398+
impl<T, const N: usize> core::fmt::Debug for Receiver<'_, T, N> {
396399
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
397400
write!(f, "Receiver")
398401
}
399402
}
400403

401404
#[cfg(feature = "defmt-03")]
402-
impl<'a, T, const N: usize> defmt::Format for Receiver<'a, T, N> {
405+
impl<T, const N: usize> defmt::Format for Receiver<'_, T, N> {
403406
fn format(&self, f: defmt::Formatter) {
404407
defmt::write!(f, "Receiver",)
405408
}
@@ -415,7 +418,7 @@ pub enum ReceiveError {
415418
Empty,
416419
}
417420

418-
impl<'a, T, const N: usize> Receiver<'a, T, N> {
421+
impl<T, const N: usize> Receiver<'_, T, N> {
419422
/// Receives a value if there is one in the channel, non-blocking.
420423
pub fn try_recv(&mut self) -> Result<T, ReceiveError> {
421424
// Try to get a ready slot.
@@ -487,7 +490,7 @@ impl<'a, T, const N: usize> Receiver<'a, T, N> {
487490
}
488491
}
489492

490-
impl<'a, T, const N: usize> Drop for Receiver<'a, T, N> {
493+
impl<T, const N: usize> Drop for Receiver<'_, T, N> {
491494
fn drop(&mut self) {
492495
// Mark the receiver as dropped and wake all waiters
493496
critical_section::with(|cs| *self.0.access(cs).receiver_dropped = true);

rtic-sync/src/signal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ where
7171
}
7272
}
7373

74-
impl<'a, T: Copy> SignalWriter<'a, T> {
74+
impl<T: Copy> SignalWriter<'_, T> {
7575
/// Write a raw Store value to the Signal.
7676
fn write_inner(&mut self, value: Store<T>) {
7777
critical_section::with(|_| {

rtic-time/src/timer_queue.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ pub struct Delay<'q, Backend: TimerQueueBackend> {
211211
marker: AtomicUsize,
212212
}
213213

214-
impl<'q, Backend: TimerQueueBackend> Future for Delay<'q, Backend> {
214+
impl<Backend: TimerQueueBackend> Future for Delay<'_, Backend> {
215215
type Output = ();
216216

217217
fn poll(self: Pin<&mut Self>, cx: &mut core::task::Context<'_>) -> Poll<Self::Output> {
@@ -249,7 +249,7 @@ impl<'q, Backend: TimerQueueBackend> Future for Delay<'q, Backend> {
249249
}
250250
}
251251

252-
impl<'q, Backend: TimerQueueBackend> Drop for Delay<'q, Backend> {
252+
impl<Backend: TimerQueueBackend> Drop for Delay<'_, Backend> {
253253
fn drop(&mut self) {
254254
// SAFETY: Drop cannot be run at the same time as poll, so we can't end up
255255
// derefencing this concurrently to the one in `poll`.
@@ -269,7 +269,7 @@ pub struct Timeout<'q, Backend: TimerQueueBackend, F> {
269269
future: F,
270270
}
271271

272-
impl<'q, Backend: TimerQueueBackend, F: Future> Future for Timeout<'q, Backend, F> {
272+
impl<Backend: TimerQueueBackend, F: Future> Future for Timeout<'_, Backend, F> {
273273
type Output = Result<F::Output, TimeoutError>;
274274

275275
fn poll(self: Pin<&mut Self>, cx: &mut core::task::Context<'_>) -> Poll<Self::Output> {

rtic/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Example:
2020

2121
## [Unreleased]
2222

23+
## [v2.1.2] - 2024-12-06
24+
2325
### Changed
2426

2527
- Updated esp32c3 dependency to v0.26.0

rtic/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ name = "rtic"
1616
readme = "../README.md"
1717
repository = "https://github.com/rtic-rs/rtic"
1818

19-
version = "2.1.1"
19+
version = "2.1.2"
2020

2121
[package.metadata.docs.rs]
22-
features = ["rtic-macros/test-template"]
22+
features = ["thumbv7-backend"]
2323

2424
[lib]
2525
name = "rtic"
@@ -31,7 +31,7 @@ riscv = { version = "0.12.1", optional = true }
3131
cortex-m = { version = "0.7.0", optional = true }
3232
bare-metal = "1.0.0"
3333
portable-atomic = { version = "1", default-features = false }
34-
rtic-macros = { path = "../rtic-macros", version = "=2.1.0" }
34+
rtic-macros = { path = "../rtic-macros", version = "=2.1.1" }
3535
rtic-core = "1"
3636
critical-section = "1"
3737

0 commit comments

Comments
 (0)