mirror of
https://gitlab.com/keys.openpgp.org/hagrid.git
synced 2025-10-06 00:23:08 +02:00
Fix imports after migration to 2024 edition.
Differences in Rust edition lead to compilation errors like the ones below: error[E0432]: unresolved import `sync` --> database/src/fs.rs:15:5 | 15 | use sync::FlockMutexGuard; | ^^^^ help: a similar path exists: `crate::sync` | = note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html> error[E0432]: unresolved import `types` --> database/src/fs.rs:16:5 | 16 | use types::{Email, Fingerprint, KeyID}; | ^^^^^ help: a similar path exists: `crate::types` | = note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html> error[E0432]: unresolved imports `Database`, `Query` --> database/src/fs.rs:18:6 | 18 | use {Database, Query}; | ^^^^^^^^ ^^^^^ no external crate `Query` | | | no external crate `Database` | = help: consider importing this trait instead: crate::Database = help: consider importing this enum instead: crate::Query error[E0432]: unresolved import `wkd` --> database/src/fs.rs:20:5 | 20 | use wkd; | ^^^ no external crate `wkd` | help: consider importing this module instead | 20 | use crate::wkd; | +++++++ error[E0432]: unresolved import `openpgp_utils` --> database/src/fs.rs:25:5 | 25 | use openpgp_utils::POLICY; | ^^^^^^^^^^^^^ help: a similar path exists: `crate::openpgp_utils` | = note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html> error[E0432]: unresolved import `types` --> database/src/sqlite.rs:11:5 | 11 | use types::{Email, Fingerprint, KeyID}; | ^^^^^ help: a similar path exists: `crate::types` | = note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html> error[E0432]: unresolved imports `Database`, `Query` --> database/src/sqlite.rs:13:6 | 13 | use {Database, Query}; | ^^^^^^^^ ^^^^^ no external crate `Query` | | | no external crate `Database` | = help: consider importing this trait instead: crate::Database = help: consider importing this enum instead: crate::Query error[E0432]: unresolved import `Email` --> database/src/openpgp_utils.rs:9:5 | 9 | use Email; | ^^^^^ no external crate `Email` | help: consider importing this struct through its public re-export instead | 9 | use crate::Email; | +++++++ Changes: - Prefix imports with "crate::" as compiler suggest to fix the errors.
This commit is contained in:
@@ -12,17 +12,17 @@ use std::time::SystemTime;
|
||||
use tempfile;
|
||||
use url::form_urlencoded;
|
||||
|
||||
use sync::FlockMutexGuard;
|
||||
use types::{Email, Fingerprint, KeyID};
|
||||
use crate::sync::FlockMutexGuard;
|
||||
use crate::types::{Email, Fingerprint, KeyID};
|
||||
use Result;
|
||||
use {Database, Query};
|
||||
use crate::{Database, Query};
|
||||
|
||||
use wkd;
|
||||
use crate::wkd;
|
||||
|
||||
use tempfile::NamedTempFile;
|
||||
|
||||
use openpgp::Cert;
|
||||
use openpgp_utils::POLICY;
|
||||
use crate::openpgp_utils::POLICY;
|
||||
|
||||
use crate::DatabaseTransaction;
|
||||
|
||||
|
@@ -6,7 +6,7 @@ use openpgp::{
|
||||
types::RevocationStatus, Cert,
|
||||
};
|
||||
|
||||
use Email;
|
||||
use crate::Email;
|
||||
|
||||
pub const POLICY: StandardPolicy = StandardPolicy::new();
|
||||
|
||||
|
@@ -8,9 +8,9 @@ use std::str::FromStr;
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
use openpgp::policy::StandardPolicy;
|
||||
use types::{Email, Fingerprint, KeyID};
|
||||
use crate::types::{Email, Fingerprint, KeyID};
|
||||
use Result;
|
||||
use {Database, Query};
|
||||
use crate::{Database, Query};
|
||||
|
||||
use openpgp::Cert;
|
||||
|
||||
|
@@ -26,14 +26,13 @@ use openpgp::{
|
||||
types::RevocationStatus,
|
||||
Cert, Packet,
|
||||
};
|
||||
use types::{Email, Fingerprint, KeyID};
|
||||
use Database;
|
||||
use Query;
|
||||
use crate::types::{Email, Fingerprint, KeyID};
|
||||
use crate::{Database, Query};
|
||||
|
||||
use openpgp_utils::POLICY;
|
||||
use crate::openpgp_utils::POLICY;
|
||||
|
||||
use EmailAddressStatus;
|
||||
use TpkStatus;
|
||||
use crate::EmailAddressStatus;
|
||||
use crate::TpkStatus;
|
||||
|
||||
use crate::DatabaseTransaction;
|
||||
|
||||
|
Reference in New Issue
Block a user