summaryrefslogtreecommitdiffstats
path: root/src/backends/clang.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/clang.rs')
-rw-r--r--src/backends/clang.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backends/clang.rs b/src/backends/clang.rs
index 11c316a..361c759 100644
--- a/src/backends/clang.rs
+++ b/src/backends/clang.rs
@@ -1,4 +1,4 @@
-use serde_derive::{ Serialize, Deserialize };
+use serde_derive::Deserialize;
use crate::backends::{ Backend, mk_tmp_dir, RunError };
use std::path::{ Path, PathBuf };
use std::io::{ Result as IoResult, Error, ErrorKind };
@@ -7,9 +7,10 @@ use std::collections::hash_map::DefaultHasher;
use std::hash::{ Hash, Hasher };
use crate::wait::{ ChildExitStatus, wait_child };
use std::time::Duration;
+use crate::serde_duration::deserialize_duration;
-#[derive(Debug, Serialize, Deserialize, Default)]
+#[derive(Debug, Deserialize, Default)]
pub struct ClangBackend {
template: Option<String>,
@@ -19,7 +20,7 @@ pub struct ClangBackend {
#[serde(default = "default_cc")]
cc: String,
- #[serde(default = "default_timeout")]
+ #[serde(default = "default_timeout", deserialize_with = "deserialize_duration")]
timeout: Duration
}