Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Zeeshan Ali
gstreamer-rs
Commits
d4fb10ef
Commit
d4fb10ef
authored
Jul 22, 2018
by
François Laignel
Committed by
Sebastian Dröge
Jul 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Toc: serde: rename `loop_` to `loop`
parent
0aac0557
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
gstreamer/src/toc_serde.rs
gstreamer/src/toc_serde.rs
+14
-13
No files found.
gstreamer/src/toc_serde.rs
View file @
d4fb10ef
...
...
@@ -38,7 +38,7 @@ impl Serialize for TocEntryRef {
toc_entry
.serialize_field
(
"uid"
,
&
self
.get_uid
())
?
;
toc_entry
.serialize_field
(
"start_stop"
,
&
self
.get_start_stop_times
())
?
;
toc_entry
.serialize_field
(
"tags"
,
&
self
.get_tags
())
?
;
toc_entry
.serialize_field
(
"loop
_
"
,
&
self
.get_loop
())
?
;
toc_entry
.serialize_field
(
"loop"
,
&
self
.get_loop
())
?
;
toc_entry
.serialize_field
(
"sub_entries"
,
&
self
.get_sub_entries
())
?
;
toc_entry
.end
()
}
...
...
@@ -77,7 +77,7 @@ impl From<TocDe> for Toc {
impl
<
'de
>
Deserialize
<
'de
>
for
Toc
{
fn
deserialize
<
D
:
Deserializer
<
'de
>>
(
deserializer
:
D
)
->
Result
<
Self
,
D
::
Error
>
{
TocDe
::
deserialize
(
deserializer
)
.
and_then
(|
toc_de
|
Ok
(
toc_de
.into
())
)
.
map
(|
toc_de
|
toc_de
.into
())
}
}
...
...
@@ -87,6 +87,7 @@ struct TocEntryDe {
uid
:
String
,
start_stop
:
Option
<
(
i64
,
i64
)
>
,
tags
:
Option
<
TagList
>
,
#[serde(rename
=
"loop"
)]
loop_
:
Option
<
(
TocLoopType
,
i32
)
>
,
sub_entries
:
Vec
<
TocEntry
>
,
}
...
...
@@ -118,7 +119,7 @@ impl From<TocEntryDe> for TocEntry {
impl
<
'de
>
Deserialize
<
'de
>
for
TocEntry
{
fn
deserialize
<
D
:
Deserializer
<
'de
>>
(
deserializer
:
D
)
->
Result
<
Self
,
D
::
Error
>
{
TocEntryDe
::
deserialize
(
deserializer
)
.
and_then
(|
toc_entry_de
|
Ok
(
toc_entry_de
.into
())
)
.
map
(|
toc_entry_de
|
toc_entry_de
.into
())
}
}
...
...
@@ -209,14 +210,14 @@ mod tests {
" uid:
\"
edition
\"
,"
,
" start_stop: Some((0, 15)),"
,
" tags: None,"
,
" loop
_
: Some((None, 0)),"
,
" loop: Some((None, 0)),"
,
" sub_entries: ["
,
" ("
,
" entry_type: Chapter,"
,
" uid:
\"
chapter1
\"
,"
,
" start_stop: Some((0, 10)),"
,
" tags: None,"
,
" loop
_
: Some((None, 0)),"
,
" loop: Some((None, 0)),"
,
" sub_entries: ["
,
" ("
,
" entry_type: Chapter,"
,
...
...
@@ -227,7 +228,7 @@ mod tests {
"
\"
chapter 1.1
\"
,"
,
" ]),"
,
" ]),"
,
" loop
_
: Some((None, 0)),"
,
" loop: Some((None, 0)),"
,
" sub_entries: ["
,
" ],"
,
" ),"
,
...
...
@@ -240,7 +241,7 @@ mod tests {
"
\"
chapter 1.2
\"
,"
,
" ]),"
,
" ]),"
,
" loop
_
: Some((None, 0)),"
,
" loop: Some((None, 0)),"
,
" sub_entries: ["
,
" ],"
,
" ),"
,
...
...
@@ -255,7 +256,7 @@ mod tests {
"
\"
chapter 2
\"
,"
,
" ]),"
,
" ]),"
,
" loop
_
: Some((None, 0)),"
,
" loop: Some((None, 0)),"
,
" sub_entries: ["
,
" ],"
,
" ),"
,
...
...
@@ -287,14 +288,14 @@ mod tests {
uid: "edition",
start_stop: Some((0, 15)),
tags: None,
loop
_
: Some((None, 0)),
loop: Some((None, 0)),
sub_entries: [
(
entry_type: Chapter,
uid: "chapter1",
start_stop: Some((0, 10)),
tags: None,
loop
_
: Some((None, 0)),
loop: Some((None, 0)),
sub_entries: [
(
entry_type: Chapter,
...
...
@@ -303,7 +304,7 @@ mod tests {
tags: Some([
("title", ["chapter 1.1"]),
]),
loop
_
: Some((None, 0)),
loop: Some((None, 0)),
sub_entries: [
],
),
...
...
@@ -314,7 +315,7 @@ mod tests {
tags: Some([
("title", ["chapter 1.2"]),
]),
loop
_
: Some((None, 0)),
loop: Some((None, 0)),
sub_entries: [
],
),
...
...
@@ -327,7 +328,7 @@ mod tests {
tags: Some([
("title", ["chapter 2"]),
]),
loop
_
: Some((None, 0)),
loop: Some((None, 0)),
sub_entries: [
],
),
...
...
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