update build and rust config change
This commit is contained in:
parent
7a3513200f
commit
6b0b42ebcc
|
@ -327,27 +327,17 @@ impl<'de> Deserialize<'de> for Config {
|
||||||
.transpose()?
|
.transpose()?
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
let build = if let Some(build) = table.remove("build") {
|
let build: BuildConfig = table
|
||||||
match build.try_into() {
|
.remove("build")
|
||||||
Ok(b) => b,
|
.map(|build| build.try_into().map_err(D::Error::custom))
|
||||||
Err(e) => {
|
.transpose()?
|
||||||
return Err(D::Error::custom(e));
|
.unwrap_or_default();
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
BuildConfig::default()
|
|
||||||
};
|
|
||||||
|
|
||||||
let rust = if let Some(rust) = table.remove("rust") {
|
let rust: RustConfig = table
|
||||||
match rust.try_into() {
|
.remove("rust")
|
||||||
Ok(b) => b,
|
.map(|rust| rust.try_into().map_err(D::Error::custom))
|
||||||
Err(e) => {
|
.transpose()?
|
||||||
return Err(D::Error::custom(e));
|
.unwrap_or_default();
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
RustConfig::default()
|
|
||||||
};
|
|
||||||
|
|
||||||
Ok(Config {
|
Ok(Config {
|
||||||
book,
|
book,
|
||||||
|
|
Loading…
Reference in New Issue