Skip to content

Commit

Permalink
Do not access non existing properties or NaiveDate
Browse files Browse the repository at this point in the history
  • Loading branch information
TrackerSB committed Mar 24, 2024
1 parent f8606c5 commit 71d7398
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 54 deletions.
3 changes: 0 additions & 3 deletions frb_example/pure_dart/rust/src/api/chrono_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ pub fn naivedate_twin_normal(d: chrono::NaiveDate) -> chrono::NaiveDate {
assert_eq!(&d.year(), &2022);
assert_eq!(&d.month(), &9);
assert_eq!(&d.day(), &10);
assert_eq!(&d.hour(), &20);
assert_eq!(&d.minute(), &48);
assert_eq!(&d.second(), &53);
#[cfg(target_arch = "wasm32")]
assert_eq!(&d.nanosecond(), &123_000_000);
#[cfg(not(target_arch = "wasm32"))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ pub async fn naivedate_twin_rust_async(d: chrono::NaiveDate) -> chrono::NaiveDat
assert_eq!(&d.year(), &2022);
assert_eq!(&d.month(), &9);
assert_eq!(&d.day(), &10);
assert_eq!(&d.hour(), &20);
assert_eq!(&d.minute(), &48);
assert_eq!(&d.second(), &53);
#[cfg(target_arch = "wasm32")]
assert_eq!(&d.nanosecond(), &123_000_000);
#[cfg(not(target_arch = "wasm32"))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ pub async fn naivedate_twin_rust_async_sse(d: chrono::NaiveDate) -> chrono::Naiv
assert_eq!(&d.year(), &2022);
assert_eq!(&d.month(), &9);
assert_eq!(&d.day(), &10);
assert_eq!(&d.hour(), &20);
assert_eq!(&d.minute(), &48);
assert_eq!(&d.second(), &53);
#[cfg(target_arch = "wasm32")]
assert_eq!(&d.nanosecond(), &123_000_000);
#[cfg(not(target_arch = "wasm32"))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ pub fn naivedate_twin_sse(d: chrono::NaiveDate) -> chrono::NaiveDate {
assert_eq!(&d.year(), &2022);
assert_eq!(&d.month(), &9);
assert_eq!(&d.day(), &10);
assert_eq!(&d.hour(), &20);
assert_eq!(&d.minute(), &48);
assert_eq!(&d.second(), &53);
#[cfg(target_arch = "wasm32")]
assert_eq!(&d.nanosecond(), &123_000_000);
#[cfg(not(target_arch = "wasm32"))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ pub fn naivedate_twin_sync(d: chrono::NaiveDate) -> chrono::NaiveDate {
assert_eq!(&d.year(), &2022);
assert_eq!(&d.month(), &9);
assert_eq!(&d.day(), &10);
assert_eq!(&d.hour(), &20);
assert_eq!(&d.minute(), &48);
assert_eq!(&d.second(), &53);
#[cfg(target_arch = "wasm32")]
assert_eq!(&d.nanosecond(), &123_000_000);
#[cfg(not(target_arch = "wasm32"))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ pub fn naivedate_twin_sync_sse(d: chrono::NaiveDate) -> chrono::NaiveDate {
assert_eq!(&d.year(), &2022);
assert_eq!(&d.month(), &9);
assert_eq!(&d.day(), &10);
assert_eq!(&d.hour(), &20);
assert_eq!(&d.minute(), &48);
assert_eq!(&d.second(), &53);
#[cfg(target_arch = "wasm32")]
assert_eq!(&d.nanosecond(), &123_000_000);
#[cfg(not(target_arch = "wasm32"))]
Expand Down
3 changes: 0 additions & 3 deletions frb_example/pure_dart/test/api/chrono_type_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ Future<void> main({bool skipRustLibInit = false}) async {
expect(resp.year, date.year);
expect(resp.month, date.month);
expect(resp.day, date.day);
expect(resp.hour, date.hour);
expect(resp.minute, date.minute);
expect(resp.second, date.second);
expect(resp.millisecondsSinceEpoch, date.millisecondsSinceEpoch);
expect(resp.microsecondsSinceEpoch, date.microsecondsSinceEpoch);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ Future<void> main({bool skipRustLibInit = false}) async {
expect(resp.year, date.year);
expect(resp.month, date.month);
expect(resp.day, date.day);
expect(resp.hour, date.hour);
expect(resp.minute, date.minute);
expect(resp.second, date.second);
expect(resp.millisecondsSinceEpoch, date.millisecondsSinceEpoch);
expect(resp.microsecondsSinceEpoch, date.microsecondsSinceEpoch);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ Future<void> main({bool skipRustLibInit = false}) async {
expect(resp.year, date.year);
expect(resp.month, date.month);
expect(resp.day, date.day);
expect(resp.hour, date.hour);
expect(resp.minute, date.minute);
expect(resp.second, date.second);
expect(resp.millisecondsSinceEpoch, date.millisecondsSinceEpoch);
expect(resp.microsecondsSinceEpoch, date.microsecondsSinceEpoch);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ Future<void> main({bool skipRustLibInit = false}) async {
expect(resp.year, date.year);
expect(resp.month, date.month);
expect(resp.day, date.day);
expect(resp.hour, date.hour);
expect(resp.minute, date.minute);
expect(resp.second, date.second);
expect(resp.millisecondsSinceEpoch, date.millisecondsSinceEpoch);
expect(resp.microsecondsSinceEpoch, date.microsecondsSinceEpoch);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ Future<void> main({bool skipRustLibInit = false}) async {
expect(resp.year, date.year);
expect(resp.month, date.month);
expect(resp.day, date.day);
expect(resp.hour, date.hour);
expect(resp.minute, date.minute);
expect(resp.second, date.second);
expect(resp.millisecondsSinceEpoch, date.millisecondsSinceEpoch);
expect(resp.microsecondsSinceEpoch, date.microsecondsSinceEpoch);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ Future<void> main({bool skipRustLibInit = false}) async {
expect(resp.year, date.year);
expect(resp.month, date.month);
expect(resp.day, date.day);
expect(resp.hour, date.hour);
expect(resp.minute, date.minute);
expect(resp.second, date.second);
expect(resp.millisecondsSinceEpoch, date.millisecondsSinceEpoch);
expect(resp.microsecondsSinceEpoch, date.microsecondsSinceEpoch);
});
Expand Down
3 changes: 0 additions & 3 deletions frb_example/pure_dart_pde/rust/src/api/chrono_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ pub fn naivedate_twin_normal(d: chrono::NaiveDate) -> chrono::NaiveDate {
assert_eq!(&d.year(), &2022);
assert_eq!(&d.month(), &9);
assert_eq!(&d.day(), &10);
assert_eq!(&d.hour(), &20);
assert_eq!(&d.minute(), &48);
assert_eq!(&d.second(), &53);
#[cfg(target_arch = "wasm32")]
assert_eq!(&d.nanosecond(), &123_000_000);
#[cfg(not(target_arch = "wasm32"))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ pub async fn naivedate_twin_rust_async(d: chrono::NaiveDate) -> chrono::NaiveDat
assert_eq!(&d.year(), &2022);
assert_eq!(&d.month(), &9);
assert_eq!(&d.day(), &10);
assert_eq!(&d.hour(), &20);
assert_eq!(&d.minute(), &48);
assert_eq!(&d.second(), &53);
#[cfg(target_arch = "wasm32")]
assert_eq!(&d.nanosecond(), &123_000_000);
#[cfg(not(target_arch = "wasm32"))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ pub fn naivedate_twin_sync(d: chrono::NaiveDate) -> chrono::NaiveDate {
assert_eq!(&d.year(), &2022);
assert_eq!(&d.month(), &9);
assert_eq!(&d.day(), &10);
assert_eq!(&d.hour(), &20);
assert_eq!(&d.minute(), &48);
assert_eq!(&d.second(), &53);
#[cfg(target_arch = "wasm32")]
assert_eq!(&d.nanosecond(), &123_000_000);
#[cfg(not(target_arch = "wasm32"))]
Expand Down
3 changes: 0 additions & 3 deletions frb_example/pure_dart_pde/test/api/chrono_type_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ Future<void> main({bool skipRustLibInit = false}) async {
expect(resp.year, date.year);
expect(resp.month, date.month);
expect(resp.day, date.day);
expect(resp.hour, date.hour);
expect(resp.minute, date.minute);
expect(resp.second, date.second);
expect(resp.millisecondsSinceEpoch, date.millisecondsSinceEpoch);
expect(resp.microsecondsSinceEpoch, date.microsecondsSinceEpoch);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ Future<void> main({bool skipRustLibInit = false}) async {
expect(resp.year, date.year);
expect(resp.month, date.month);
expect(resp.day, date.day);
expect(resp.hour, date.hour);
expect(resp.minute, date.minute);
expect(resp.second, date.second);
expect(resp.millisecondsSinceEpoch, date.millisecondsSinceEpoch);
expect(resp.microsecondsSinceEpoch, date.microsecondsSinceEpoch);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ Future<void> main({bool skipRustLibInit = false}) async {
expect(resp.year, date.year);
expect(resp.month, date.month);
expect(resp.day, date.day);
expect(resp.hour, date.hour);
expect(resp.minute, date.minute);
expect(resp.second, date.second);
expect(resp.millisecondsSinceEpoch, date.millisecondsSinceEpoch);
expect(resp.microsecondsSinceEpoch, date.microsecondsSinceEpoch);
});
Expand Down

0 comments on commit 71d7398

Please sign in to comment.