Port try macro to new ? operator. (#3962)
* initial untry sweep * restore try in ipc codegen, fix inference * change a few missed try instances
This commit is contained in:
committed by
Arkadiy Paronyan
parent
b1ef52a6d7
commit
8125b5690c
@@ -86,10 +86,9 @@ pub fn setup_log(config: &Config) -> Result<Arc<RotatingLogger>, String> {
|
||||
let mut open_options = fs::OpenOptions::new();
|
||||
|
||||
let maybe_file = match config.file.as_ref() {
|
||||
Some(f) => Some(try!(open_options
|
||||
Some(f) => Some(open_options
|
||||
.append(true).create(true).open(f)
|
||||
.map_err(|_| format!("Cannot write to log file given: {}", f))
|
||||
)),
|
||||
.map_err(|_| format!("Cannot write to log file given: {}", f))?),
|
||||
None => None,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user