diff options
| author | troido <troido@protonmail.com> | 2020-02-23 11:30:48 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-23 11:30:48 +0100 |
| commit | 9a814769565ab36c227508c47792e112de338df1 (patch) | |
| tree | 446426c01f80506037da0b062d91b6b38542225d /src/util.rs | |
| parent | d722e9b374dce358aeb9deb7298284fb07b1a5f5 (diff) | |
removed ToJson trait
Diffstat (limited to 'src/util.rs')
| -rw-r--r-- | src/util.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/util.rs b/src/util.rs index 1aee8a4..db572c6 100644 --- a/src/util.rs +++ b/src/util.rs @@ -2,17 +2,11 @@ use std::error::Error; use std::fmt::{Display, Formatter}; use std::cmp::{min, max}; -use serde_json::Value; pub fn clamp<T: Ord>(val: T, lower: T, upper: T) -> T{ max(min(val, upper), lower) } -pub trait ToJson { - fn to_json(&self) -> Value; -} - - pub type AnyError = Box<dyn Error + 'static>; pub type Result<T> = std::result::Result<T, AnyError>; |
