Skip to content

Commit

Permalink
Clippy lints and fix datetime tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tobywf committed Nov 28, 2024
1 parent 24af6f9 commit ae11371
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions crates/api-types/src/serde/bytes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::fmt;

struct Base64Visitor;

impl<'de> serde::de::Visitor<'de> for Base64Visitor {
impl serde::de::Visitor<'_> for Base64Visitor {
type Value = Vec<u8>;

#[inline]
Expand All @@ -22,7 +22,7 @@ impl<'de> serde::de::Visitor<'de> for Base64Visitor {

struct BytesVisitor;

impl<'de> serde::de::Visitor<'de> for BytesVisitor {
impl serde::de::Visitor<'_> for BytesVisitor {
type Value = Vec<u8>;

#[inline]
Expand Down
16 changes: 8 additions & 8 deletions crates/exchange/src/ser/io_writer/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ macro_rules! serde_unsupported {
};
}

impl<'a, W: Write> ser::Serializer for &'a mut IoWriter<W> {
impl<W: Write> ser::Serializer for &mut IoWriter<W> {
type Ok = ();
type Error = Error;

Expand Down Expand Up @@ -206,7 +206,7 @@ impl<'a, W: Write> ser::Serializer for &'a mut IoWriter<W> {
}
}

impl<'a, W: Write> ser::SerializeSeq for &'a mut IoWriter<W> {
impl<W: Write> ser::SerializeSeq for &mut IoWriter<W> {
type Ok = ();
type Error = Error;

Expand All @@ -224,7 +224,7 @@ impl<'a, W: Write> ser::SerializeSeq for &'a mut IoWriter<W> {
}
}

impl<'a, W: Write> ser::SerializeStruct for &'a mut IoWriter<W> {
impl<W: Write> ser::SerializeStruct for &mut IoWriter<W> {
type Ok = ();
type Error = Error;

Expand All @@ -243,7 +243,7 @@ impl<'a, W: Write> ser::SerializeStruct for &'a mut IoWriter<W> {
}
}

impl<'a, W: Write> ser::SerializeTuple for &'a mut IoWriter<W> {
impl<W: Write> ser::SerializeTuple for &mut IoWriter<W> {
type Ok = ();
type Error = Error;

Expand All @@ -261,7 +261,7 @@ impl<'a, W: Write> ser::SerializeTuple for &'a mut IoWriter<W> {
}
}

impl<'a, W: Write> ser::SerializeTupleStruct for &'a mut IoWriter<W> {
impl<W: Write> ser::SerializeTupleStruct for &mut IoWriter<W> {
type Ok = ();
type Error = Error;

Expand All @@ -279,7 +279,7 @@ impl<'a, W: Write> ser::SerializeTupleStruct for &'a mut IoWriter<W> {
}
}

impl<'a, W: Write> ser::SerializeMap for &'a mut IoWriter<W> {
impl<W: Write> ser::SerializeMap for &mut IoWriter<W> {
type Ok = ();
type Error = Error;

Expand Down Expand Up @@ -314,7 +314,7 @@ impl<'a, W: Write> ser::SerializeMap for &'a mut IoWriter<W> {
}
}

impl<'a, W: Write> ser::SerializeTupleVariant for &'a mut IoWriter<W> {
impl<W: Write> ser::SerializeTupleVariant for &mut IoWriter<W> {
type Ok = ();
type Error = Error;

Expand All @@ -332,7 +332,7 @@ impl<'a, W: Write> ser::SerializeTupleVariant for &'a mut IoWriter<W> {
}
}

impl<'a, W: Write> ser::SerializeStructVariant for &'a mut IoWriter<W> {
impl<W: Write> ser::SerializeStructVariant for &mut IoWriter<W> {
type Ok = ();
type Error = Error;

Expand Down
2 changes: 1 addition & 1 deletion crates/timestamp/src/datetime/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Time {
};
}

const T_RFC: &str = "1970-01-01T00:00:00Z";
const T_RFC: &str = "1970-01-01T00:00:00.0Z";

#[test]
fn time_json() {
Expand Down
3 changes: 1 addition & 2 deletions crates/timestamp/src/unix/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ use super::{from_timestamp, to_timestamp, DateTime};
use crate::consts::{date, time};
use time::PrimitiveDateTime;

const EPOCHALYPSE: PrimitiveDateTime =
PrimitiveDateTime::new(date(2038, 01, 19), time(3, 14, 07, 0));
const EPOCHALYPSE: PrimitiveDateTime = PrimitiveDateTime::new(date(2038, 1, 19), time(3, 14, 7, 0));

#[test]
fn from_timestamp_does_not_panic() {
Expand Down

0 comments on commit ae11371

Please sign in to comment.