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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
1835083b
Commit
1835083b
authored
1 year ago
by
bgallois
Committed by
Hugo Trentesaux
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fix unused_must_use
parent
d26d1256
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
pallets/distance/src/lib.rs
+1
-1
1 addition, 1 deletion
pallets/distance/src/lib.rs
pallets/oneshot-account/src/lib.rs
+9
-4
9 additions, 4 deletions
pallets/oneshot-account/src/lib.rs
pallets/universal-dividend/src/lib.rs
+2
-2
2 additions, 2 deletions
pallets/universal-dividend/src/lib.rs
with
12 additions
and
7 deletions
pallets/distance/src/lib.rs
+
1
−
1
View file @
1835083b
...
...
@@ -555,7 +555,7 @@ pub mod pallet {
}
Some
(
false
)
=>
{
// negative result, slash and deposit event
T
::
Currency
::
slash_reserved
(
let
_
=
T
::
Currency
::
slash_reserved
(
&
requester
,
<
T
as
Config
>
::
EvaluationPrice
::
get
(),
);
...
...
This diff is collapsed.
Click to expand it.
pallets/oneshot-account/src/lib.rs
+
9
−
4
View file @
1835083b
...
...
@@ -147,7 +147,7 @@ pub mod pallet {
Error
::
<
T
>
::
OneshotAccountAlreadyCreated
);
<
T
::
Currency
as
Currency
<
T
::
AccountId
>>
::
withdraw
(
let
_
=
<
T
::
Currency
as
Currency
<
T
::
AccountId
>>
::
withdraw
(
&
transactor
,
value
,
WithdrawReasons
::
TRANSFER
,
...
...
@@ -206,6 +206,7 @@ pub mod pallet {
creator
:
transactor
.clone
(),
});
}
else
{
let
_
=
<
T
::
Currency
as
Currency
<
T
::
AccountId
>>
::
deposit_into_existing
(
&
dest
,
value
)
?
;
}
OneshotAccounts
::
<
T
>
::
remove
(
&
transactor
);
...
...
@@ -295,7 +296,9 @@ pub mod pallet {
creator
:
transactor
.clone
(),
});
}
else
{
<
T
::
Currency
as
Currency
<
T
::
AccountId
>>
::
deposit_into_existing
(
&
dest2
,
balance2
)
?
;
let
_
=
<
T
::
Currency
as
Currency
<
T
::
AccountId
>>
::
deposit_into_existing
(
&
dest2
,
balance2
,
)
?
;
}
if
dest1_is_oneshot
{
OneshotAccounts
::
<
T
>
::
insert
(
&
dest1
,
balance1
);
...
...
@@ -305,7 +308,9 @@ pub mod pallet {
creator
:
transactor
.clone
(),
});
}
else
{
<
T
::
Currency
as
Currency
<
T
::
AccountId
>>
::
deposit_into_existing
(
&
dest1
,
balance1
)
?
;
let
_
=
<
T
::
Currency
as
Currency
<
T
::
AccountId
>>
::
deposit_into_existing
(
&
dest1
,
balance1
,
)
?
;
}
OneshotAccounts
::
<
T
>
::
remove
(
&
transactor
);
Self
::
deposit_event
(
Event
::
OneshotAccountConsumed
{
...
...
This diff is collapsed.
Click to expand it.
pallets/universal-dividend/src/lib.rs
+
2
−
2
View file @
1835083b
...
...
@@ -305,7 +305,7 @@ pub mod pallet {
core
::
num
::
NonZeroU16
::
new
(
current_ud_index
)
.expect
(
"unrechable because current_ud_index is never zero."
),
);
T
::
Currency
::
deposit_creating
(
who
,
uds_total
);
let
_
=
T
::
Currency
::
deposit_creating
(
who
,
uds_total
);
Self
::
deposit_event
(
Event
::
UdsClaimed
{
count
:
uds_count
,
total
:
uds_total
,
...
...
@@ -443,7 +443,7 @@ pub mod pallet {
first_ud_index
,
PastReevals
::
<
T
>
::
get
()
.into_iter
(),
);
T
::
Currency
::
deposit_creating
(
who
,
uds_total
);
let
_
=
T
::
Currency
::
deposit_creating
(
who
,
uds_total
);
Self
::
deposit_event
(
Event
::
UdsAutoPaid
{
count
:
uds_count
,
total
:
uds_total
,
...
...
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