mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-10-02 23:04:40 +00:00
impl Default
This commit is contained in:
parent
e7c4c7b1f2
commit
3264c92292
@ -241,6 +241,12 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T, const N: usize> Default for HistoryBuffer<T, N> {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::HistoryBuffer;
|
use crate::HistoryBuffer;
|
||||||
|
@ -178,6 +178,12 @@ impl<T, const N: usize> MpMcQueue<T, N> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T, const N: usize> Default for MpMcQueue<T, N> {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unsafe impl<T, const N: usize> Sync for MpMcQueue<T, N> where T: Send {}
|
unsafe impl<T, const N: usize> Sync for MpMcQueue<T, N> where T: Send {}
|
||||||
|
|
||||||
struct Cell<T> {
|
struct Cell<T> {
|
||||||
|
@ -297,6 +297,12 @@ impl<T, const N: usize> Queue<T, N> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T, const N: usize> Default for Queue<T, N> {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<T, const N: usize> Clone for Queue<T, N>
|
impl<T, const N: usize> Clone for Queue<T, N>
|
||||||
where
|
where
|
||||||
T: Clone,
|
T: Clone,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user