diff --git a/lib/src/sql/script.rs b/lib/src/sql/script.rs index 098bdc5a..3f635568 100644 --- a/lib/src/sql/script.rs +++ b/lib/src/sql/script.rs @@ -1,16 +1,22 @@ use crate::sql::error::IResult; use serde::{Deserialize, Serialize}; use std::fmt; +use std::ops::Deref; use std::str; #[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)] -pub struct Script { - pub value: String, +pub struct Script(pub String); + +impl Deref for Script { + type Target = String; + fn deref(&self) -> &Self::Target { + &self.0 + } } impl fmt::Display for Script { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "\"{}\"", self.value) + write!(f, "\"{}\"", self.0) } }