chore: mark dead code
Some checks are pending
Install / Cargo install on ubuntu-latest (push) Waiting to run

This commit is contained in:
Jesús Pérez 2024-09-30 14:44:25 +01:00
parent 8e26926a56
commit 01b179830d
No known key found for this signature in database
4 changed files with 16 additions and 6 deletions

View File

@ -5,11 +5,14 @@ use serde::de::DeserializeOwned;
use log::info; use log::info;
pub const CFG_FILE_EXTENSION: &str = ".toml"; pub const CFG_FILE_EXTENSION: &str = ".toml";
/*
// To include DocServer as part of higher Application Definition
pub trait AppDef { pub trait AppDef {
fn app_def<T>(&mut self, root_path: String ); // -> T; fn app_def<T>(&mut self, root_path: String ); // -> T;
} }
*/
pub trait FromFile { pub trait FromFile {
// To use with global AppDef root path
fn fix_root_path<T>(&mut self, root_path: String ); // -> T; fn fix_root_path<T>(&mut self, root_path: String ); // -> T;
} }
pub fn load_from_file<'a, T: FromFile + DeserializeOwned>(file_cfg: &str, name: &str) -> Result<T> { pub fn load_from_file<'a, T: FromFile + DeserializeOwned>(file_cfg: &str, name: &str) -> Result<T> {
@ -41,6 +44,8 @@ pub fn load_from_file<'a, T: FromFile + DeserializeOwned>(file_cfg: &str, name:
} }
pub trait DictFromFile { pub trait DictFromFile {
#![allow(dead_code)]
// To include DocServer as part of Full Dictionaries Definition
fn fix_root_path<T>(&mut self, root_path: String ); // -> T; fn fix_root_path<T>(&mut self, root_path: String ); // -> T;
} }
pub fn load_dict_from_file<'a, T: DictFromFile + DeserializeOwned>(file_cfg: &str, name: &str) -> Result<HashMap<String,T>> { pub fn load_dict_from_file<'a, T: DictFromFile + DeserializeOwned>(file_cfg: &str, name: &str) -> Result<HashMap<String,T>> {
@ -66,8 +71,8 @@ pub fn load_dict_from_file<'a, T: DictFromFile + DeserializeOwned>(file_cfg: &st
}, },
Err(e) => { Err(e) => {
return Err(Error::new( return Err(Error::new(
ErrorKind::InvalidInput, ErrorKind::InvalidInput,
format!("Error loading {} {}: {}",name,&file_path,e) format!("Error loading {} {}: {}",name,&file_path,e)
)) ))
}, },
}; };

View File

@ -86,10 +86,12 @@ pub struct OpenidConf {
pub signup_application: String, pub signup_application: String,
} }
#[allow(dead_code)]
// To include DocServer as part of Full Dictionaries Definition
pub struct OpenidCli { pub struct OpenidCli {
pub client: CoreClient, pub client: CoreClient,
pub pk_challenge: PkceCodeChallenge, pub pk_challenge: PkceCodeChallenge,
pub pk_verifier: PkceCodeVerifier, pub pk_verifier: PkceCodeVerifier,
} }
pub struct OpenidClient { pub struct OpenidClient {
pub url: Url, pub url: Url,

View File

@ -34,6 +34,8 @@ use super::{CLAIM_UID, CLAIM_AUTH, CLAIM_APP_KEY};
pub struct ReqHandler<'a> { pub struct ReqHandler<'a> {
pub req_header: ReqHeaderMap, pub req_header: ReqHeaderMap,
pub app_dbs: &'a AppDBs, pub app_dbs: &'a AppDBs,
// To include DocServer as part of Full Dictionaries Definition
#[allow(dead_code)]
pub lang: Local, pub lang: Local,
pub uri: &'a Uri, pub uri: &'a Uri,
pub auth_state: AuthState, pub auth_state: AuthState,

View File

@ -22,6 +22,7 @@ use crate::defs::{
pub struct ReqHeaderMap { pub struct ReqHeaderMap {
pub header: HeaderMap, pub header: HeaderMap,
#[allow(dead_code)]
pub req_path: Vec<String>, pub req_path: Vec<String>,
pub app_connect_info: AppConnectInfo, pub app_connect_info: AppConnectInfo,
} }