Skip to content

bug: Type Error self.timestamp > signed_packet.timestamp().into() #3313

Open
@ISensuiI

Description

@ISensuiI

Describe the bug
I'm trying to upgrade from version 33 to 35, but when I introduce a new library, I get an error. My rust version is 1.86.0, and it's a type conversion error.

Relevant Logs
warning: unused imports: DatabaseBackend and Statement
--> migration\src\m20250401_000009_iroh_net_report_metrics.rs:3:34
|
3 | use sea_orm_migration::sea_orm::{DatabaseBackend, Statement};
| ^^^^^^^^^^^^^^^ ^^^^^^^^^

warning: unused imports: DatabaseBackend and Statement
--> migration\src\m20250401_000005_iroh_dns_server_metrics.rs:3:34
|
3 | use sea_orm_migration::sea_orm::{DatabaseBackend, Statement};
| ^^^^^^^^^^^^^^^ ^^^^^^^^^

error[E0283]: type annotations needed
--> C:\Users\Sen.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\iroh-dns-server-0.35.0\src\store.rs:284:52
|
284 | self.timestamp > signed_packet.timestamp().into()
| - ^^^^
| |
| type must be known at this point
|
= note: multiple impls satisfying u64: PartialOrd<_> found in the following crates: core, deranged:
- impl PartialOrd for u64;
- impl<MIN, MAX> PartialOrd<deranged::RangedU64<MIN, MAX>> for u64
where the constant MIN has type u64, the constant MAX has type u64;
help: try using a fully qualified path to specify the expected types
|
284 - self.timestamp > signed_packet.timestamp().into()
284 + self.timestamp > <pkarr::Timestamp as Into>::into(signed_packet.timestamp())
|

error[E0283]: type annotations needed
--> C:\Users\Sen.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\iroh-dns-server-0.35.0\src\store.rs:284:52
|
284 | self.timestamp > signed_packet.timestamp().into()
| ^^^^
|
= note: multiple impls satisfying _: From<pkarr::Timestamp> found in the ntimestamp crate:
- impl Frompkarr::Timestamp for SystemTime;
- impl Frompkarr::Timestamp for [u8; 8];
- impl Frompkarr::Timestamp for httpdate::date::HttpDate;
- impl Frompkarr::Timestamp for u64;
= note: required for pkarr::Timestamp to implement Into<_>
help: try using a fully qualified path to specify the expected types
|
284 - self.timestamp > signed_packet.timestamp().into()
284 + self.timestamp > <pkarr::Timestamp as Into>::into(signed_packet.timestamp())
|

For more information about this error, try rustc --explain E0283.
error: could not compile iroh-dns-server (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

Platform(s)
Desktop

  • OS: Win11
  • Version 23H2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions