Skip to content

v0.29.0-alpha (November 18th, 2021) Pre-release

Pre-release
Pre-release
Compare
Choose a tag to compare
@Velfi Velfi released this 19 Nov 17:00
· 2439 commits to main since this release
f2b05cf

Breaking Changes

Several breaking changes around aws_smithy_types::Instant were introduced by smithy-rs#849:

  • aws_smithy_types::Instant from was renamed to DateTime to avoid confusion with the standard library's monotonically nondecreasing Instant type.
  • DateParseError in aws_smithy_types has been renamed to DateTimeParseError to match the type that's being parsed.
  • The chrono-conversions feature and associated functions have been moved to the aws-smithy-types-convert crate.
    • Calls to Instant::from_chrono should be changed to:
      use aws_smithy_types::DateTime;
      use aws_smithy_types_convert::date_time::DateTimeExt;
      
      // For chrono::DateTime<Utc>
      let date_time = DateTime::from_chrono_utc(chrono_date_time);
      // For chrono::DateTime<FixedOffset>
      let date_time = DateTime::from_chrono_offset(chrono_date_time);
    • Calls to instant.to_chrono() should be changed to:
      use aws_smithy_types_convert::date_time::DateTimeExt;
      
      date_time.to_chrono_utc();
  • Instant::from_system_time and Instant::to_system_time have been changed to From trait implementations.
    • Calls to from_system_time should be changed to:
      DateTime::from(system_time);
      // or
      let date_time: DateTime = system_time.into();
    • Calls to to_system_time should be changed to:
      SystemTime::from(date_time);
      // or
      let system_time: SystemTime = date_time.into();
  • Several functions in Instant/DateTime were renamed:
    • Instant::from_f64 -> DateTime::from_secs_f64
    • Instant::from_fractional_seconds -> DateTime::from_fractional_secs
    • Instant::from_epoch_seconds -> DateTime::from_secs
    • Instant::from_epoch_millis -> DateTime::from_millis
    • Instant::epoch_fractional_seconds -> DateTime::as_secs_f64
    • Instant::has_nanos -> DateTime::has_subsec_nanos
    • Instant::epoch_seconds -> DateTime::secs
    • Instant::epoch_subsecond_nanos -> DateTime::subsec_nanos
    • Instant::to_epoch_millis -> DateTime::to_millis
  • The DateTime::fmt method is now fallible and fails when a DateTime's value is outside what can be represented by the desired date format.
  • In aws-sigv4, the SigningParams builder's date_time setter was renamed to time and changed to take a std::time::SystemTime instead of a chrono's DateTime<Utc>.

New this week

  • ⚠️ MSRV increased from 1.53.0 to 1.54.0 per our 3-behind MSRV policy.
  • Conversions from aws_smithy_types::DateTime to OffsetDateTime from the time crate are now available from the aws-smithy-types-convert crate. (smithy-rs#849)
  • Fixed links to Usage Examples (smithy-rs#862, @floric)

New Contributors