Skip to content
This repository was archived by the owner on Dec 10, 2022. It is now read-only.

Commit 5b67060

Browse files
committed
feat(config): change the error msg for config:threads
1 parent b341c0c commit 5b67060

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/node_config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ fn de_log_type<'de, D>(deserializer: D) -> Result<LogType, D::Error> where D: De
9393
}
9494
}
9595

96-
fn de_thread<'de, D>(deserializer: D) -> Result<Threads, D::Error> where D: Deserializer<'de> {
96+
fn de_threads<'de, D>(deserializer: D) -> Result<Threads, D::Error> where D: Deserializer<'de> {
9797
let s = String::deserialize(deserializer)?;
9898

9999
Threads::from_str(&s)
100-
.map_err(|e| de::Error::custom(format!("Can't parse Threads {:?}", e)))
100+
.map_err(|e| de::Error::custom(format!("threads: {:?}", e)))
101101
}
102102

103103
impl BootstrapNode {
@@ -145,7 +145,7 @@ pub struct NodeConfig {
145145
#[serde(default)]
146146
pub bootstrap_nodes: Vec<BootstrapNode>,
147147
/// Number of threads for execution.
148-
#[serde(deserialize_with = "de_thread")]
148+
#[serde(deserialize_with = "de_threads")]
149149
pub threads: Threads,
150150
/// Specifies where to write logs.
151151
#[serde(deserialize_with = "de_log_type")]

0 commit comments

Comments
 (0)