diff --git a/tdlib-rs-parser/src/tl/definition.rs b/tdlib-rs-parser/src/tl/definition.rs index 5698fd9..88fb2b4 100644 --- a/tdlib-rs-parser/src/tl/definition.rs +++ b/tdlib-rs-parser/src/tl/definition.rs @@ -125,11 +125,7 @@ impl FromStr for Definition { } // Parse `description` - let description = if let Some(description) = docs.remove("description") { - description - } else { - String::new() - }; + let description = docs.remove("description").unwrap_or_default(); // Parse `middle` let params = middle diff --git a/tdlib-rs/build.rs b/tdlib-rs/build.rs index 50b6fb9..b358785 100644 --- a/tdlib-rs/build.rs +++ b/tdlib-rs/build.rs @@ -40,7 +40,7 @@ fn load_tl(file: &str) -> std::io::Result> { .collect()) } - #[cfg(not(any(feature = "docs", feature = "pkg-config", feature = "download-tdlib")))] +#[cfg(not(any(feature = "docs", feature = "pkg-config", feature = "download-tdlib")))] /// Copy all files from a directory to another. fn copy_dir_all(src: impl AsRef, dst: impl AsRef) -> std::io::Result<()> { std::fs::create_dir_all(&dst)?;