Fix P1 Rust: use dd0c_route:: instead of crate:: in binary imports, add hex crate
Some checks failed
CI — P1 Route (Rust) / test (push) Failing after 4m37s
Some checks failed
CI — P1 Route (Rust) / test (push) Failing after 4m37s
Binary targets (api, proxy, worker) can't use crate:: to access lib modules. Must reference the library crate name dd0c_route:: instead.
This commit is contained in:
@@ -18,6 +18,7 @@ name = "dd0c-worker"
|
||||
path = "src/worker/main.rs"
|
||||
|
||||
[dependencies]
|
||||
hex = "0.4.3"
|
||||
# Web framework
|
||||
axum = { version = "0.7", features = ["ws", "macros"] }
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
|
||||
@@ -9,8 +9,8 @@ use serde::{Deserialize, Serialize};
|
||||
use std::sync::Arc;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::auth::{AuthContext, AuthError, AuthProvider, Role};
|
||||
use crate::config::AppConfig;
|
||||
use dd0c_route::auth::{AuthContext, AuthError, AuthProvider, Role};
|
||||
use dd0c_route::config::AppConfig;
|
||||
|
||||
pub struct ApiState {
|
||||
pub auth: Arc<dyn AuthProvider>,
|
||||
|
||||
@@ -13,10 +13,10 @@ use tracing::{info, warn};
|
||||
|
||||
use super::middleware;
|
||||
|
||||
use crate::auth::AuthProvider;
|
||||
use crate::config::AppConfig;
|
||||
use crate::data::{EventQueue, TelemetryEvent};
|
||||
use crate::router::RouterBrain;
|
||||
use dd0c_route::auth::AuthProvider;
|
||||
use dd0c_route::config::AppConfig;
|
||||
use dd0c_route::data::{EventQueue, TelemetryEvent};
|
||||
use dd0c_route::router::RouterBrain;
|
||||
|
||||
pub struct ProxyState {
|
||||
pub auth: Arc<dyn AuthProvider>,
|
||||
@@ -181,8 +181,8 @@ pub enum ProxyError {
|
||||
UpstreamError(String),
|
||||
}
|
||||
|
||||
impl From<crate::auth::AuthError> for ProxyError {
|
||||
fn from(e: crate::auth::AuthError) -> Self {
|
||||
impl From<dd0c_route::auth::AuthError> for ProxyError {
|
||||
fn from(e: dd0c_route::auth::AuthError) -> Self {
|
||||
ProxyError::AuthError(e.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user