diff --git a/docs/Unit-Test-Advice.md b/docs/Unit-Test-Advice.md index 07af3922f1..cc46486a08 100644 --- a/docs/Unit-Test-Advice.md +++ b/docs/Unit-Test-Advice.md @@ -129,7 +129,7 @@ pub type Result = std::result::Result; // Accepts a string and an integer and returns the // result of sticking them together separated by a dash as a string. fn join_params_with_dash(str: &str, num: i32) -> Result { - if str == "" { + if str.is_empty() { return Err("string cannot be blank"); }