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

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:
2026-03-01 16:08:25 +00:00
parent 5346e88331
commit b5e5d22c32
3 changed files with 9 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ name = "dd0c-worker"
path = "src/worker/main.rs" path = "src/worker/main.rs"
[dependencies] [dependencies]
hex = "0.4.3"
# Web framework # Web framework
axum = { version = "0.7", features = ["ws", "macros"] } axum = { version = "0.7", features = ["ws", "macros"] }
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] }

View File

@@ -9,8 +9,8 @@ use serde::{Deserialize, Serialize};
use std::sync::Arc; use std::sync::Arc;
use uuid::Uuid; use uuid::Uuid;
use crate::auth::{AuthContext, AuthError, AuthProvider, Role}; use dd0c_route::auth::{AuthContext, AuthError, AuthProvider, Role};
use crate::config::AppConfig; use dd0c_route::config::AppConfig;
pub struct ApiState { pub struct ApiState {
pub auth: Arc<dyn AuthProvider>, pub auth: Arc<dyn AuthProvider>,

View File

@@ -13,10 +13,10 @@ use tracing::{info, warn};
use super::middleware; use super::middleware;
use crate::auth::AuthProvider; use dd0c_route::auth::AuthProvider;
use crate::config::AppConfig; use dd0c_route::config::AppConfig;
use crate::data::{EventQueue, TelemetryEvent}; use dd0c_route::data::{EventQueue, TelemetryEvent};
use crate::router::RouterBrain; use dd0c_route::router::RouterBrain;
pub struct ProxyState { pub struct ProxyState {
pub auth: Arc<dyn AuthProvider>, pub auth: Arc<dyn AuthProvider>,
@@ -181,8 +181,8 @@ pub enum ProxyError {
UpstreamError(String), UpstreamError(String),
} }
impl From<crate::auth::AuthError> for ProxyError { impl From<dd0c_route::auth::AuthError> for ProxyError {
fn from(e: crate::auth::AuthError) -> Self { fn from(e: dd0c_route::auth::AuthError) -> Self {
ProxyError::AuthError(e.to_string()) ProxyError::AuthError(e.to_string())
} }
} }