We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 68f45da + 98bc0ab commit bf9c99aCopy full SHA for bf9c99a
1 file changed
src/lib.rs
@@ -457,7 +457,7 @@ impl num::traits::FromPrimitive for Weekday {
457
458
459
/// The common set of methods for date component.
460
-pub trait Datelike {
+pub trait Datelike: Sized {
461
/// Returns the year number.
462
fn year(&self) -> i32;
463
@@ -550,7 +550,7 @@ pub trait Datelike {
550
}
551
552
/// The common set of methods for time component.
553
-pub trait Timelike {
+pub trait Timelike: Sized {
554
/// Returns the hour number from 0 to 23.
555
fn hour(&self) -> u32;
556
0 commit comments