Skip to content

Commit d8bd7ed

Browse files
authored
Remove unused dead code (#288)
1 parent b8954f6 commit d8bd7ed

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

pdp-server/src/api/authzen/errors.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use axum::{
33
response::{IntoResponse, Response},
44
};
55
use serde::{Deserialize, Serialize};
6-
use utoipa::ToSchema;
76

87
/// AuthZen error codes as defined in the specification
98
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
@@ -35,14 +34,6 @@ pub struct AuthZenError {
3534
pub message: String,
3635
}
3736

38-
/// AuthZen error details for OpenAPI documentation only
39-
/// This is NOT used in actual responses, only for OpenAPI schema generation
40-
#[derive(Debug, Serialize, Deserialize, ToSchema)]
41-
pub struct AuthZenErrorDetails {
42-
pub code: String,
43-
pub message: String,
44-
}
45-
4637
impl AuthZenError {
4738
/// Create a new AuthZen error
4839
pub fn new(code: AuthZenErrorCode, message: impl Into<String>) -> Self {

pdp-server/src/cache/mod.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use log::error;
2-
use serde::{de::DeserializeOwned, Deserialize, Serialize};
2+
use serde::{de::DeserializeOwned, Serialize};
33
use thiserror::Error;
44

55
pub mod memory;
@@ -19,12 +19,6 @@ pub enum CacheError {
1919
Config(String),
2020
}
2121

22-
#[derive(Debug, Serialize, Deserialize)]
23-
struct CacheValue {
24-
data: String,
25-
expires_at: u64,
26-
}
27-
2822
/// Cache trait defining the interface for all cache implementations.
2923
///
3024
/// This trait represents the contract that all cache backends must fulfill.

pdp-server/src/opa_client/user_permissions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ pub struct UserPermissionsResult {
127127
}
128128
// Define a newtype wrapper for HashMap<String, UserPermissionsResult>
129129
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, ToSchema)]
130+
#[allow(dead_code)] // Used for OpenAPI documentation generation
130131
pub struct UserPermissionsResults(pub HashMap<String, UserPermissionsResult>);
131132

132133
// Implement IntoResponse for our newtype

0 commit comments

Comments
 (0)