diff --git a/xtask/src/codegen/gen_unstable_future_descriptor.rs b/xtask/src/codegen/gen_unstable_future_descriptor.rs index fee68c3658..56065f17da 100644 --- a/xtask/src/codegen/gen_unstable_future_descriptor.rs +++ b/xtask/src/codegen/gen_unstable_future_descriptor.rs @@ -30,7 +30,7 @@ pub fn generate_unstable_future_descriptor(mode: Mode) -> 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::>();