Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Vaultwarden
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Vaultwarden
Commits
6b1daeba
Unverified
Commit
6b1daeba
authored
3 years ago
by
Jake Howard
Browse files
Options
Downloads
Patches
Plain Diff
Implement `From` over `Into`
https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
parent
9f1240d8
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
src/api/core/two_factor/u2f.rs
+5
-5
5 additions, 5 deletions
src/api/core/two_factor/u2f.rs
src/auth.rs
+15
-15
15 additions, 15 deletions
src/auth.rs
with
20 additions
and
20 deletions
src/api/core/two_factor/u2f.rs
+
5
−
5
View file @
6b1daeba
...
...
@@ -131,12 +131,12 @@ struct RegisterResponseCopy {
pub
error_code
:
Option
<
NumberOrString
>
,
}
impl
Into
<
RegisterResponse
>
for
RegisterResponse
Copy
{
fn
into
(
self
)
->
RegisterResponse
{
impl
From
<
RegisterResponse
Copy
>
for
RegisterResponse
{
fn
from
(
r
:
RegisterResponseCopy
)
->
RegisterResponse
{
RegisterResponse
{
registration_data
:
self
.registration_data
,
version
:
self
.version
,
client_data
:
self
.client_data
,
registration_data
:
r
.registration_data
,
version
:
r
.version
,
client_data
:
r
.client_data
,
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/auth.rs
+
15
−
15
View file @
6b1daeba
...
...
@@ -450,12 +450,12 @@ impl<'a, 'r> FromRequest<'a, 'r> for AdminHeaders {
}
}
impl
Into
<
Headers
>
for
Admin
Headers
{
fn
into
(
self
)
->
Headers
{
impl
From
<
Admin
Headers
>
for
Headers
{
fn
from
(
h
:
AdminHeaders
)
->
Headers
{
Headers
{
host
:
self
.host
,
device
:
self
.device
,
user
:
self
.user
,
host
:
h
.host
,
device
:
h
.device
,
user
:
h
.user
,
}
}
}
...
...
@@ -529,12 +529,12 @@ impl<'a, 'r> FromRequest<'a, 'r> for ManagerHeaders {
}
}
impl
Into
<
Headers
>
for
Manager
Headers
{
fn
into
(
self
)
->
Headers
{
impl
From
<
Manager
Headers
>
for
Headers
{
fn
from
(
h
:
ManagerHeaders
)
->
Headers
{
Headers
{
host
:
self
.host
,
device
:
self
.device
,
user
:
self
.user
,
host
:
h
.host
,
device
:
h
.device
,
user
:
h
.user
,
}
}
}
...
...
@@ -571,12 +571,12 @@ impl<'a, 'r> FromRequest<'a, 'r> for ManagerHeadersLoose {
}
}
impl
Into
<
Headers
>
for
ManagerHeadersLoose
{
fn
into
(
self
)
->
Headers
{
impl
From
<
ManagerHeadersLoose
>
for
Headers
{
fn
from
(
h
:
ManagerHeadersLoose
)
->
Headers
{
Headers
{
host
:
self
.host
,
device
:
self
.device
,
user
:
self
.user
,
host
:
h
.host
,
device
:
h
.device
,
user
:
h
.user
,
}
}
}
...
...
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