1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-04 02:24:12 +02:00

clippy fixes

This commit is contained in:
Robin Appelman 2023-06-03 18:30:30 +02:00
commit a561cbaf64
12 changed files with 345 additions and 398 deletions

View file

@ -92,9 +92,9 @@ impl<E: Endianness> BitWrite<E> for MaybeUtf8String {
}
}
impl Into<String> for MaybeUtf8String {
fn into(self) -> String {
match self {
impl From<MaybeUtf8String> for String {
fn from(str: MaybeUtf8String) -> String {
match str {
MaybeUtf8String::Valid(s) => s,
MaybeUtf8String::Invalid(_) => "-- Malformed utf8 --".into(),
}
@ -150,7 +150,7 @@ pub struct ServerTick(u32);
impl ServerTick {
pub fn range_inclusive(&self, till: Self) -> impl Iterator<Item = Self> {
(self.0..=till.0).into_iter().map(Self::from)
(self.0..=till.0).map(Self::from)
}
}
@ -242,7 +242,7 @@ pub struct DemoTick(u32);
impl DemoTick {
pub fn range_inclusive(&self, till: Self) -> impl Iterator<Item = Self> {
(self.0..=till.0).into_iter().map(Self::from)
(self.0..=till.0).map(Self::from)
}
}