removing not needed unused nonsense
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
Reference in New Issue
Block a user