Skip to content

Commit d05705c

Browse files
committed
minor serde style fix
1 parent e07fb7c commit d05705c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/serde_impls.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use {
22
crate::{TextRange, TextSize},
3-
serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer},
3+
serde::{de, Deserialize, Deserializer, Serialize, Serializer},
44
};
55

66
impl Serialize for TextSize {
@@ -31,13 +31,14 @@ impl Serialize for TextRange {
3131
}
3232

3333
impl<'de> Deserialize<'de> for TextRange {
34+
#[allow(clippy::nonminimal_bool)]
3435
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
3536
where
3637
D: Deserializer<'de>,
3738
{
3839
let (start, end) = Deserialize::deserialize(deserializer)?;
3940
if !(start <= end) {
40-
return Err(Error::custom(format!(
41+
return Err(de::Error::custom(format!(
4142
"invalid range: {:?}..{:?}",
4243
start, end
4344
)));

0 commit comments

Comments
 (0)