Replace uses of try!() macro with "?" operator
This commit is contained in:
parent
1dda98e17e
commit
9308c05057
5 changed files with 15 additions and 15 deletions
|
@ -88,13 +88,13 @@ pub fn day(rt: &Runtime) -> i32 {
|
|||
acc.and_then(|_| {
|
||||
debug!("Processing {:?}", e.get_location());
|
||||
|
||||
let tag = try!(e.get_timetrack_tag());
|
||||
let tag = e.get_timetrack_tag()?;
|
||||
debug!(" -> tag = {:?}", tag);
|
||||
|
||||
let start = try!(e.get_start_datetime());
|
||||
let start = e.get_start_datetime()?;
|
||||
debug!(" -> start = {:?}", start);
|
||||
|
||||
let end = try!(e.get_end_datetime());
|
||||
let end = e.get_end_datetime()?;
|
||||
debug!(" -> end = {:?}", end);
|
||||
|
||||
match (start, end) {
|
||||
|
|
|
@ -91,13 +91,13 @@ pub fn list(rt: &Runtime) -> i32 {
|
|||
acc.and_then(|_| {
|
||||
debug!("Processing {:?}", e.get_location());
|
||||
|
||||
let tag = try!(e.get_timetrack_tag());
|
||||
let tag = e.get_timetrack_tag()?;
|
||||
debug!(" -> tag = {:?}", tag);
|
||||
|
||||
let start = try!(e.get_start_datetime());
|
||||
let start = e.get_start_datetime()?;
|
||||
debug!(" -> start = {:?}", start);
|
||||
|
||||
let end = try!(e.get_end_datetime());
|
||||
let end = e.get_end_datetime()?;
|
||||
debug!(" -> end = {:?}", end);
|
||||
|
||||
match (start, end) {
|
||||
|
|
|
@ -103,13 +103,13 @@ pub fn month(rt: &Runtime) -> i32 {
|
|||
acc.and_then(|_| {
|
||||
debug!("Processing {:?}", e.get_location());
|
||||
|
||||
let tag = try!(e.get_timetrack_tag());
|
||||
let tag = e.get_timetrack_tag()?;
|
||||
debug!(" -> tag = {:?}", tag);
|
||||
|
||||
let start = try!(e.get_start_datetime());
|
||||
let start = e.get_start_datetime()?;
|
||||
debug!(" -> start = {:?}", start);
|
||||
|
||||
let end = try!(e.get_end_datetime());
|
||||
let end = e.get_end_datetime()?;
|
||||
debug!(" -> end = {:?}", end);
|
||||
|
||||
match (start, end) {
|
||||
|
|
|
@ -95,13 +95,13 @@ pub fn week(rt: &Runtime) -> i32 {
|
|||
acc.and_then(|_| {
|
||||
debug!("Processing {:?}", e.get_location());
|
||||
|
||||
let tag = try!(e.get_timetrack_tag());
|
||||
let tag = e.get_timetrack_tag()?;
|
||||
debug!(" -> tag = {:?}", tag);
|
||||
|
||||
let start = try!(e.get_start_datetime());
|
||||
let start = e.get_start_datetime()?;
|
||||
debug!(" -> start = {:?}", start);
|
||||
|
||||
let end = try!(e.get_end_datetime());
|
||||
let end = e.get_end_datetime()?;
|
||||
debug!(" -> end = {:?}", end);
|
||||
|
||||
match (start, end) {
|
||||
|
|
|
@ -94,13 +94,13 @@ pub fn year(rt: &Runtime) -> i32 {
|
|||
acc.and_then(|_| {
|
||||
debug!("Processing {:?}", e.get_location());
|
||||
|
||||
let tag = try!(e.get_timetrack_tag());
|
||||
let tag = e.get_timetrack_tag()?;
|
||||
debug!(" -> tag = {:?}", tag);
|
||||
|
||||
let start = try!(e.get_start_datetime());
|
||||
let start = e.get_start_datetime()?;
|
||||
debug!(" -> start = {:?}", start);
|
||||
|
||||
let end = try!(e.get_end_datetime());
|
||||
let end = e.get_end_datetime()?;
|
||||
debug!(" -> end = {:?}", end);
|
||||
|
||||
match (start, end) {
|
||||
|
|
Loading…
Reference in a new issue