Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
Tenjin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nawasan Wisitsingkhon
Tenjin
Commits
42d8f444
Commit
42d8f444
authored
Jun 16, 2024
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove impl Clone, and use derve(Clone) instead
parent
749e51b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
37 deletions
+4
-37
actions.rs
src/openflow/ofp10/events/actions.rs
+3
-20
ofp_port.rs
src/openflow/ofp10/ofp_port.rs
+1
-17
No files found.
src/openflow/ofp10/events/actions.rs
View file @
42d8f444
...
...
@@ -25,6 +25,7 @@ pub enum ActionType {
Enqueue
=
11
,
}
#[derive(Clone)]
pub
enum
Action
{
Oputput
(
PseudoPort
),
SetDlVlan
(
Option
<
u16
>
),
...
...
@@ -239,23 +240,4 @@ impl SizeCheck for Vec<Action> {
not_ctrl
.append
(
&
mut
is_ctrl
);
not_ctrl
}
}
impl
Clone
for
Action
{
fn
clone
(
&
self
)
->
Self
{
match
self
{
Self
::
Oputput
(
v
)
=>
Self
::
Oputput
(
v
.clone
()),
Self
::
SetDlVlan
(
v
)
=>
Self
::
SetDlVlan
(
v
.clone
()),
Self
::
SetDlVlanPcp
(
v
)
=>
Self
::
SetDlVlanPcp
(
v
.clone
()),
Self
::
SetDlSrc
(
v
)
=>
Self
::
SetDlSrc
(
v
.clone
()),
Self
::
SetDlDest
(
v
)
=>
Self
::
SetDlDest
(
v
.clone
()),
Self
::
SetIpSrc
(
v
)
=>
Self
::
SetIpSrc
(
v
.clone
()),
Self
::
SetIpDes
(
v
)
=>
Self
::
SetIpDes
(
v
.clone
()),
Self
::
SetTos
(
v
)
=>
Self
::
SetTos
(
v
.clone
()),
Self
::
SetTpSrc
(
v
)
=>
Self
::
SetTpSrc
(
v
.clone
()),
Self
::
SetTpDest
(
v
)
=>
Self
::
SetTpDest
(
v
.clone
()),
Self
::
Enqueue
(
v
,
arg1
)
=>
Self
::
Enqueue
(
v
.clone
(),
arg1
.clone
()),
Self
::
Unparsable
=>
Self
::
Unparsable
,
}
}
}
}
\ No newline at end of file
src/openflow/ofp10/ofp_port.rs
View file @
42d8f444
...
...
@@ -12,6 +12,7 @@ pub enum OfpPort {
None
=
0xffff
,
}
#[derive(Clone)]
pub
enum
PseudoPort
{
PhysicalPort
(
u16
),
InPort
,
...
...
@@ -68,19 +69,3 @@ impl PseudoPort {
let
_
=
bytes
.write_u16
::
<
BigEndian
>
(
port
);
}
}
impl
Clone
for
PseudoPort
{
fn
clone
(
&
self
)
->
Self
{
match
self
{
Self
::
PhysicalPort
(
arg0
)
=>
Self
::
PhysicalPort
(
arg0
.clone
()),
Self
::
InPort
=>
Self
::
InPort
,
Self
::
Table
=>
Self
::
Table
,
Self
::
Normal
=>
Self
::
Normal
,
Self
::
Flood
=>
Self
::
Flood
,
Self
::
AllPorts
=>
Self
::
AllPorts
,
Self
::
Controller
(
arg0
)
=>
Self
::
Controller
(
arg0
.clone
()),
Self
::
Local
=>
Self
::
Local
,
Self
::
Unsupport
=>
Self
::
Unsupport
,
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment