Skip to content

Commit 65176cd

Browse files
author
ferris
committed
Fix spelling & constraints
1 parent ee0b60a commit 65176cd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/musli.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Implemements encoding/decoding for Mulsi
1+
//! Implements encoding/decoding for Musli
22
33
use musli_core::{
44
mode::{Binary, Text},
@@ -17,7 +17,7 @@ impl Encode<Binary> for Ulid {
1717
#[inline]
1818
fn encode<E>(&self, encoder: E) -> Result<(), E::Error>
1919
where
20-
E: Encoder,
20+
E: Encoder<Mode = Binary>,
2121
{
2222
encoder.encode_array(&self.to_bytes())
2323
}
@@ -38,7 +38,7 @@ impl Encode<Text> for Ulid {
3838
#[inline]
3939
fn encode<E>(&self, encoder: E) -> Result<(), E::Error>
4040
where
41-
E: Encoder,
41+
E: Encoder<Mode = Text>,
4242
{
4343
encoder.collect_string(self)
4444
}
@@ -60,7 +60,7 @@ where
6060
#[inline]
6161
fn decode<D>(decoder: D) -> Result<Self, D::Error>
6262
where
63-
D: Decoder<'de>,
63+
D: Decoder<'de, Mode = Binary>,
6464
{
6565
decoder.decode_array::<16>().map(Ulid::from)
6666
}
@@ -77,7 +77,7 @@ where
7777
#[inline]
7878
fn decode<D>(decoder: D) -> Result<Self, D::Error>
7979
where
80-
D: Decoder<'de>,
80+
D: Decoder<'de, Mode = Text>,
8181
{
8282
let cx = decoder.cx();
8383
decoder.decode_unsized(|string: &str| Ulid::from_string(string).map_err(cx.map()))

0 commit comments

Comments
 (0)