Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
77a8d0bb
Commit
77a8d0bb
authored
2 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
style: remove xtask warnings (rustc and clippy)
parent
2614f1b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
xtask/src/gen_calls_doc.rs
+3
-13
3 additions, 13 deletions
xtask/src/gen_calls_doc.rs
xtask/src/main.rs
+1
-1
1 addition, 1 deletion
xtask/src/main.rs
with
4 additions
and
14 deletions
xtask/src/gen_calls_doc.rs
+
3
−
13
View file @
77a8d0bb
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// You should have received a copy of the GNU Affero General Public License
// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>.
// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>.
use
anyhow
::{
anyhow
,
bail
,
Context
,
Result
};
use
anyhow
::{
bail
,
Context
,
Result
};
use
codec
::
Decode
;
use
codec
::
Decode
;
use
scale_info
::
form
::
PortableForm
;
use
scale_info
::
form
::
PortableForm
;
use
std
::{
use
std
::{
...
@@ -70,18 +70,10 @@ impl CallCategory {
...
@@ -70,18 +70,10 @@ impl CallCategory {
}
}
}
}
fn
is_root
(
pallet_name
:
&
str
,
call_name
:
&
str
)
->
bool
{
fn
is_root
(
pallet_name
:
&
str
,
call_name
:
&
str
)
->
bool
{
if
let
Self
::
Root
=
Self
::
is
(
pallet_name
,
call_name
)
{
matches!
(
Self
::
is
(
pallet_name
,
call_name
),
Self
::
Root
)
true
}
else
{
false
}
}
}
fn
is_user
(
pallet_name
:
&
str
,
call_name
:
&
str
)
->
bool
{
fn
is_user
(
pallet_name
:
&
str
,
call_name
:
&
str
)
->
bool
{
if
let
Self
::
User
=
Self
::
is
(
pallet_name
,
call_name
)
{
matches!
(
Self
::
is
(
pallet_name
,
call_name
),
Self
::
User
)
true
}
else
{
false
}
}
}
}
}
...
@@ -131,7 +123,6 @@ impl From<&scale_info::Variant<PortableForm>> for Call {
...
@@ -131,7 +123,6 @@ impl From<&scale_info::Variant<PortableForm>> for Call {
#[derive(Clone)]
#[derive(Clone)]
struct
CallParam
{
struct
CallParam
{
docs
:
Vec
<
String
>
,
name
:
String
,
name
:
String
,
type_name
:
String
,
type_name
:
String
,
}
}
...
@@ -139,7 +130,6 @@ struct CallParam {
...
@@ -139,7 +130,6 @@ struct CallParam {
impl
From
<&
scale_info
::
Field
<
PortableForm
>>
for
CallParam
{
impl
From
<&
scale_info
::
Field
<
PortableForm
>>
for
CallParam
{
fn
from
(
field
:
&
scale_info
::
Field
<
PortableForm
>
)
->
Self
{
fn
from
(
field
:
&
scale_info
::
Field
<
PortableForm
>
)
->
Self
{
Self
{
Self
{
docs
:
field
.docs
()
.to_vec
(),
name
:
field
.name
()
.cloned
()
.unwrap_or_default
(),
name
:
field
.name
()
.cloned
()
.unwrap_or_default
(),
type_name
:
field
.type_name
()
.cloned
()
.unwrap_or_default
(),
type_name
:
field
.type_name
()
.cloned
()
.unwrap_or_default
(),
}
}
...
...
This diff is collapsed.
Click to expand it.
xtask/src/main.rs
+
1
−
1
View file @
77a8d0bb
...
@@ -64,7 +64,7 @@ fn main() -> Result<()> {
...
@@ -64,7 +64,7 @@ fn main() -> Result<()> {
}
}
}
}
fn
build
(
production
:
bool
)
->
Result
<
()
>
{
fn
build
(
_
production
:
bool
)
->
Result
<
()
>
{
exec_should_success
(
Command
::
new
(
"cargo"
)
.args
(
&
[
"clean"
,
"-p"
,
"duniter"
]))
?
;
exec_should_success
(
Command
::
new
(
"cargo"
)
.args
(
&
[
"clean"
,
"-p"
,
"duniter"
]))
?
;
exec_should_success
(
Command
::
new
(
"cargo"
)
.args
(
&
[
"build"
,
"--locked"
]))
?
;
exec_should_success
(
Command
::
new
(
"cargo"
)
.args
(
&
[
"build"
,
"--locked"
]))
?
;
exec_should_success
(
Command
::
new
(
"mkdir"
)
.args
(
&
[
"build"
]))
?
;
exec_should_success
(
Command
::
new
(
"mkdir"
)
.args
(
&
[
"build"
]))
?
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment