Skip to content

Commit

Permalink
Generalize ufmt and dfmt for StringInner
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Jul 1, 2024
1 parent 4de4261 commit 2f1dc46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/defmt.rs
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -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,
{
Expand Down
4 changes: 2 additions & 2 deletions src/ufmt.rs
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 2f1dc46

Please sign in to comment.