Skip to content

Commit

Permalink
Warn about as usage in time related code
Browse files Browse the repository at this point in the history
See bug #771
  • Loading branch information
jonasbb committed Dec 25, 2024
1 parent abb13ca commit ef112b9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions serde_with/src/chrono_0_4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
//!
//! [chrono]: https://docs.rs/chrono/
// Serialization of large numbers can result in overflows
// The time calculations are prone to this, so lint here extra
// https://github.com/jonasbb/serde_with/issues/771
#![warn(clippy::as_conversions)]

use crate::{
formats::{Flexible, Format, Strict, Strictness},
prelude::*,
Expand Down
5 changes: 5 additions & 0 deletions serde_with/src/time_0_3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
//!
//! [time]: https://docs.rs/time/0.3/
// Serialization of large numbers can result in overflows
// The time calculations are prone to this, so lint here extra
// https://github.com/jonasbb/serde_with/issues/771
#![warn(clippy::as_conversions)]

use crate::{
formats::{Flexible, Format, Strict, Strictness},
prelude::*,
Expand Down
5 changes: 5 additions & 0 deletions serde_with/src/utils/duration.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
//! Internal Helper types
// Serialization of large numbers can result in overflows
// The time calculations are prone to this, so lint here extra
// https://github.com/jonasbb/serde_with/issues/771
#![warn(clippy::as_conversions)]

use crate::{
formats::{Flexible, Format, Strict, Strictness},
prelude::*,
Expand Down

0 comments on commit ef112b9

Please sign in to comment.