提交 3c33eefc authored 作者: Serhij S's avatar Serhij S

doc fixes

上级 c25bf26c
...@@ -26,7 +26,7 @@ impl<T> Supervisor<T> { ...@@ -26,7 +26,7 @@ impl<T> Supervisor<T> {
Self::default() Self::default()
} }
/// Spawns a new task using a [`Builder`] object and registers it. The task name MUST be unique /// Spawns a new task using a [`Builder`] object and registers it. The task name MUST be unique
/// and SHOULD be 16 characters or less to set a proper thread name /// and SHOULD be 15 characters or less to set a proper thread name
pub fn spawn<F, B>(&mut self, builder: B, f: F) -> Result<&Task<T>> pub fn spawn<F, B>(&mut self, builder: B, f: F) -> Result<&Task<T>>
where where
B: Into<Builder>, B: Into<Builder>,
...@@ -39,7 +39,7 @@ impl<T> Supervisor<T> { ...@@ -39,7 +39,7 @@ impl<T> Supervisor<T> {
Ok(entry.insert(task)) Ok(entry.insert(task))
} }
/// Spawns a new periodic task using a [`Builder`] object and registers it. The task name MUST /// Spawns a new periodic task using a [`Builder`] object and registers it. The task name MUST
/// be unique and SHOULD be 16 characters or less to set a proper thread name /// be unique and SHOULD be 15 characters or less to set a proper thread name
pub fn spawn_periodic<F, B>(&mut self, builder: B, f: F, interval: Interval) -> Result<&Task<T>> pub fn spawn_periodic<F, B>(&mut self, builder: B, f: F, interval: Interval) -> Result<&Task<T>>
where where
F: Fn() -> T + Send + 'static, F: Fn() -> T + Send + 'static,
......
...@@ -79,7 +79,7 @@ impl Builder { ...@@ -79,7 +79,7 @@ impl Builder {
pub fn new() -> Self { pub fn new() -> Self {
Self::default() Self::default()
} }
/// The task name SHOULD be 16 characters or less to set a proper thread name /// The task name SHOULD be 15 characters or less to set a proper thread name
pub fn name<N: fmt::Display>(mut self, name: N) -> Self { pub fn name<N: fmt::Display>(mut self, name: N) -> Self {
self.name = Some(name.to_string()); self.name = Some(name.to_string());
self self
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论