Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
RoboPLC
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
黄新宇
RoboPLC
Commits
696fad18
提交
696fad18
authored
3月 12, 2024
作者:
Serhij S
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs and more tests
上级
c3640f8d
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
34 行增加
和
5 行删除
+34
-5
ci.yml
.github/workflows/ci.yml
+29
-0
Cargo.toml
Cargo.toml
+2
-2
lib.rs
roboplc-derive/src/lib.rs
+1
-1
lib.rs
src/lib.rs
+2
-2
没有找到文件。
.github/workflows/ci.yml
浏览文件 @
696fad18
...
...
@@ -38,3 +38,32 @@ jobs:
-A clippy::uninlined_format_args \
-A clippy::no_effect_underscore_binding \
-A clippy::large_futures
derive-test
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v3
-
name
:
cargo test
run
:
cd roboplc-derive && cargo test --verbose --all-features --all-targets
derive-fmt
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v3
-
name
:
cargo fmt
run
:
cd roboplc-derive && cargo fmt --check
derive-clippy
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v3
-
name
:
cargo clippy
run
:
|
cd roboplc-derive && cargo clippy --all-targets -- -W clippy::all -W clippy::pedantic \
-A clippy::used-underscore-binding \
-A clippy::doc_markdown \
-A clippy::needless_pass_by_value \
-A clippy::must_use_candidate \
-A clippy::return_self_not_must_use \
-A clippy::missing_errors_doc \
-A clippy::single_match \
-A clippy::uninlined_format_args \
-A clippy::no_effect_underscore_binding \
-A clippy::large_futures
Cargo.toml
浏览文件 @
696fad18
[package]
name
=
"roboplc"
version
=
"0.1.
7
"
version
=
"0.1.
8
"
edition
=
"2021"
authors
=
[
"Serhij S. <div@altertech.com>"
]
license
=
"Apache-2.0"
...
...
@@ -27,7 +27,7 @@ oneshot = { version = "0.1.6", default-features = false, features = ["std"] }
parking_lot
=
"0.12.1"
pin-project
=
"1.1.5"
rmodbus
=
{
version
=
"0.9.2"
}
roboplc-derive
=
{
version
=
"0.1.
1
"
}
roboplc-derive
=
{
version
=
"0.1.
2
"
}
serde
=
{
version
=
"1.0.197"
,
features
=
[
"derive"
,
"rc"
]
}
serial
=
"0.4.0"
sysinfo
=
"0.30.6"
...
...
roboplc-derive/src/lib.rs
浏览文件 @
696fad18
...
...
@@ -212,7 +212,7 @@ fn parse_delivery_policy(s: Option<&str>) -> proc_macro2::TokenStream {
/// Automatically implements the `WorkerOptions` trait for a worker struct
///
/// Provides an attribute
#[worker_opts]
to specify the worker options. The attribute can be
/// Provides an attribute
`worker_opts`
to specify the worker options. The attribute can be
/// specifieid multiple times.
///
/// Atrribute arguments:
...
...
src/lib.rs
浏览文件 @
696fad18
...
...
@@ -153,11 +153,11 @@ pub trait DataDeliveryPolicy
where
Self
:
Sized
,
{
/// Delivery policy
/// Delivery policy
, the default is [`DeliveryPolicy::Always`]
fn
delivery_policy
(
&
self
)
->
DeliveryPolicy
{
DeliveryPolicy
::
Always
}
/// Priority, for ordered
/// Priority, for ordered
, lower is better, the default is 100
fn
priority
(
&
self
)
->
usize
{
100
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论