removing not needed unused nonsense

This commit is contained in:
filipriec
2025-03-09 23:40:18 +01:00
parent e152a2006b
commit 45d05d24f9
4 changed files with 214 additions and 89 deletions

View File

@@ -1,16 +0,0 @@
// src/steel/server/data_access.rs
// With this implementation
#[derive(Debug)]
pub struct SteelError(String);
impl SteelError {
pub fn new(message: impl Into<String>) -> Self {
Self(message.into())
}
}
impl std::fmt::Display for SteelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.0)
}
}

View File

@@ -1,8 +1,4 @@
// src/steel/server/mod.rs
pub mod data_access;
pub mod execution;
pub mod script;
pub use data_access::*;
pub use execution::*;
pub use script::*;

View File

@@ -1,27 +0,0 @@
// src/steel/server/script.rs
use std::fmt;
#[derive(Debug)]
pub enum ScriptValidationError {
EmptyScript,
InvalidSyntax(String),
}
impl fmt::Display for ScriptValidationError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::EmptyScript => write!(f, "Script cannot be empty"),
Self::InvalidSyntax(msg) => write!(f, "Syntax error: {}", msg),
}
}
}
pub fn validate_script(script: &str) -> Result<(), ScriptValidationError> {
// Check for empty script
if script.trim().is_empty() {
return Err(ScriptValidationError::EmptyScript);
}
// If we get here, the script passed basic validation
Ok(())
}