Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VC
rust-gitlab
Commits
5f5ffbf3
Commit
5f5ffbf3
authored
Feb 03, 2017
by
Ben Boeckel
Browse files
macros: remove a `try!()` usage for the `?` operator
parent
cce72ac1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/macros.rs
View file @
5f5ffbf3
...
...
@@ -54,7 +54,7 @@ macro_rules! enum_serialize {
impl
Deserialize
for
$name
{
fn
deserialize
<
D
:
Deserializer
>
(
deserializer
:
&
mut
D
)
->
::
std
::
result
::
Result
<
Self
,
D
::
Error
>
{
let
val
=
try!
(
String
::
deserialize
(
deserializer
)
)
;
let
val
=
String
::
deserialize
(
deserializer
)
?
;
match
val
.as_str
()
{
$
(
$str
=>
Ok
(
$name
::
$value
),
)
*
...
...
Write
Preview
Supports
Markdown
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