Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some as casts #809

Merged
merged 3 commits into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Warn about as usage in time related code
See bug #771
  • Loading branch information
jonasbb committed Dec 25, 2024
commit ef112b9b1dd534e9bbcd7acdcbc929d415b5f36b
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