diff --git a/xtask/src/codegen/gen_unstable_future_descriptor.rs b/xtask/src/codegen/gen_unstable_future_descriptor.rs index eaf063371c..3387cfe263 100644 --- a/xtask/src/codegen/gen_unstable_future_descriptor.rs +++ b/xtask/src/codegen/gen_unstable_future_descriptor.rs @@ -84,7 +84,7 @@ fn generate_descriptor(src_dir: PathBuf) -> Result { .filter(|entry| { // Get all `.md ` files entry.file_type().is_file() - && entry.path().extension().map(|ext| ext == "md").unwrap_or(false) + && entry.path().extension().unwrap_or_default() == "md" }) .collect::>();