Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
RoboPLC
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
黄新宇
RoboPLC
Commits
45daf83d
提交
45daf83d
authored
4月 20, 2024
作者:
Serhij S
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clippy fmt
上级
ee91e281
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
10 行增加
和
13 行删除
+10
-13
ci.yml
.github/workflows/ci.yml
+3
-6
main.rs
roboplc-cli/src/main.rs
+2
-2
hub.rs
src/hub.rs
+1
-1
hub_async.rs
src/hub_async.rs
+1
-1
thread_rt.rs
src/thread_rt.rs
+3
-3
没有找到文件。
.github/workflows/ci.yml
浏览文件 @
45daf83d
...
...
@@ -40,8 +40,7 @@ jobs:
-A clippy::missing_errors_doc \
-A clippy::single_match \
-A clippy::uninlined_format_args \
-A clippy::no_effect_underscore_binding \
-A clippy::large_futures
-A clippy::no_effect_underscore_binding
derive-test
:
runs-on
:
ubuntu-latest
steps
:
...
...
@@ -69,8 +68,7 @@ jobs:
-A clippy::missing_errors_doc \
-A clippy::single_match \
-A clippy::uninlined_format_args \
-A clippy::no_effect_underscore_binding \
-A clippy::large_futures
-A clippy::no_effect_underscore_binding
cli-test
:
runs-on
:
ubuntu-latest
steps
:
...
...
@@ -98,5 +96,4 @@ jobs:
-A clippy::missing_errors_doc \
-A clippy::single_match \
-A clippy::uninlined_format_args \
-A clippy::no_effect_underscore_binding \
-A clippy::large_futures
-A clippy::no_effect_underscore_binding
roboplc-cli/src/main.rs
浏览文件 @
45daf83d
...
...
@@ -360,14 +360,14 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
url
=
value
.get
(
"remote"
)
.and_then
(|
v
|
v
.get
(
"url"
))
.and_then
(
|
v
|
v
.as_str
()
)
.and_then
(
toml
::
Value
::
as_str
)
.map
(
String
::
from
);
}
if
key
.is_none
()
{
key
=
value
.get
(
"remote"
)
.and_then
(|
v
|
v
.get
(
"key"
))
.and_then
(
|
v
|
v
.as_str
()
)
.and_then
(
toml
::
Value
::
as_str
)
.map
(
String
::
from
);
}
if
timeout
.is_none
()
{
...
...
src/hub.rs
浏览文件 @
45daf83d
...
...
@@ -59,7 +59,7 @@ impl<T: DataDeliveryPolicy + Clone> Hub<T> {
pub
fn
send
(
&
self
,
message
:
T
)
{
macro_rules!
send
{
(
$sub
:
expr
,
$msg
:
expr
)
=>
{
let
_
=
$sub
.tx
.send
(
$msg
);
let
_
r
=
$sub
.tx
.send
(
$msg
);
};
}
// clones matching subscribers to keep the internal mutex unlocked and avoid deadlocks
...
...
src/hub_async.rs
浏览文件 @
45daf83d
...
...
@@ -51,7 +51,7 @@ impl<T: DataDeliveryPolicy + Clone> Hub<T> {
pub
async
fn
send
(
&
self
,
message
:
T
)
{
macro_rules!
send
{
(
$sub
:
expr
,
$msg
:
expr
)
=>
{
let
_
=
$sub
.tx
.send
(
$msg
)
.await
;
let
_
r
=
$sub
.tx
.send
(
$msg
)
.await
;
};
}
// clones matching subscribers to keep the internal mutex unlocked and avoid deadlocks
...
...
src/thread_rt.rs
浏览文件 @
45daf83d
...
...
@@ -172,7 +172,7 @@ impl Builder {
name
)));
}
builder
=
builder
.name
(
name
.
to_owned
());
builder
=
builder
.name
(
name
.
clone
());
}
if
let
Some
(
stack_size
)
=
self
.stack_size
{
builder
=
builder
.stack_size
(
stack_size
);
...
...
@@ -327,7 +327,7 @@ impl<T> Task<T> {
/// Applies new real-time params
pub
fn
apply_rt_params
(
&
mut
self
,
rt_params
:
RTParams
)
->
Result
<
()
>
{
if
let
Err
(
e
)
=
apply_thread_params
(
self
.tid
,
&
rt_params
,
false
)
{
let
_
=
apply_thread_params
(
self
.tid
,
&
self
.rt_params
,
false
);
let
_
r
=
apply_thread_params
(
self
.tid
,
&
self
.rt_params
,
false
);
return
Err
(
e
);
}
self
.rt_params
=
rt_params
;
...
...
@@ -388,7 +388,7 @@ impl<'scope, T> ScopedTask<'scope, T> {
/// Applies new real-time params
pub
fn
apply_rt_params
(
&
mut
self
,
rt_params
:
RTParams
)
->
Result
<
()
>
{
if
let
Err
(
e
)
=
apply_thread_params
(
self
.tid
,
&
rt_params
,
false
)
{
let
_
=
apply_thread_params
(
self
.tid
,
&
self
.rt_params
,
false
);
let
_
r
=
apply_thread_params
(
self
.tid
,
&
self
.rt_params
,
false
);
return
Err
(
e
);
}
self
.rt_params
=
rt_params
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论