Skip to content

Commit

Permalink
Update definition.rs
Browse files Browse the repository at this point in the history
Signed-off-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
  • Loading branch information
FedericoBruzzone committed Jun 19, 2024
1 parent 1be2ccd commit 46eccab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions tdlib-rs-parser/src/tl/definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tdlib-rs/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn load_tl(file: &str) -> std::io::Result<Vec<Definition>> {
.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<Path>, dst: impl AsRef<Path>) -> std::io::Result<()> {
std::fs::create_dir_all(&dst)?;
Expand Down

0 comments on commit 46eccab

Please sign in to comment.