diff options
Diffstat (limited to 'src/schema/value.rs')
-rw-r--r-- | src/schema/value.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/schema/value.rs b/src/schema/value.rs index f5ce151..64b0dc7 100644 --- a/src/schema/value.rs +++ b/src/schema/value.rs @@ -74,10 +74,10 @@ impl Value { /// /// # Panics /// If the value is not of type `Str` - pub fn text(&self) -> &str { + pub fn text(&self) -> Option<&str> { match *self { - Value::Str(ref text) => text, - _ => panic!("This is not a text field."), + Value::Str(ref text) => Some(text), + _ => None, } } |