Skip to content

Latest commit

 

History

History

question_mark_in_expression

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

question_mark_in_expression

What it does

Checks for ? operators embedded within a larger expression.

Why is this bad?

It can be easy to overlook the ?. Code is more readable when a ? is the outermost operator in an expression.

Example

Ok(PathBuf::from(&var("PWD")?))

Use instead:

let val = var("PWD")?;
Ok(PathBuf::from(&val))