Skip to content

Commit

Permalink
Remove unnecessary associated type bound
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt committed Dec 19, 2023
1 parent 4b932ba commit be0077a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions time/src/date_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ mod sealed {

pub trait MaybeOffset: Sized {
/// The offset type as it is stored in memory.
#[cfg(feature = "quickcheck")]
type MemoryOffsetType: Copy + MaybeOffsetType + quickcheck::Arbitrary;
#[cfg(not(feature = "quickcheck"))]
type MemoryOffsetType: Copy + MaybeOffsetType;

/// The offset type as it should be thought about.
Expand Down
5 changes: 4 additions & 1 deletion time/src/quickcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ impl Arbitrary for OffsetDateTime {
}
}

impl<O: MaybeOffset + 'static> Arbitrary for DateTime<O> {
impl<O: MaybeOffset + 'static> Arbitrary for DateTime<O>
where
O::MemoryOffsetType: Arbitrary,
{
fn arbitrary(g: &mut Gen) -> Self {
Self {
date: <_>::arbitrary(g),
Expand Down

0 comments on commit be0077a

Please sign in to comment.