mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-30 14:00:29 +00:00
Generalize ufmt and dfmt for StringInner
This commit is contained in:
parent
4de426154e
commit
2f1dc46463
@ -1,6 +1,6 @@
|
||||
//! Defmt implementations for heapless types
|
||||
|
||||
use crate::{storage::Storage, vec::VecInner};
|
||||
use crate::{storage::Storage, string::StringInner, vec::VecInner};
|
||||
use defmt::Formatter;
|
||||
|
||||
impl<T, S: Storage> defmt::Format for VecInner<T, S>
|
||||
@ -12,7 +12,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<const N: usize> defmt::Format for crate::String<N>
|
||||
impl<S: Storage> defmt::Format for StringInner<S>
|
||||
where
|
||||
u8: defmt::Format,
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::{storage::Storage, string::String, vec::VecInner};
|
||||
use crate::{storage::Storage, string::StringInner, vec::VecInner};
|
||||
use ufmt_write::uWrite;
|
||||
|
||||
impl<const N: usize> uWrite for String<N> {
|
||||
impl<S: Storage> uWrite for StringInner<S> {
|
||||
type Error = ();
|
||||
fn write_str(&mut self, s: &str) -> Result<(), Self::Error> {
|
||||
self.push_str(s)
|
||||
|
Loading…
x
Reference in New Issue
Block a user