Skip to content

Commit 190a171

Browse files
authored
Merge pull request #227 from kyrias/ignore-too-long-rustdoc-comments
Show message that doc comment is too long instead of failing
2 parents 35eaf74 + 3bc6068 commit 190a171

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/db/add_package.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ fn read_rust_doc(file_path: &Path) -> Result<Option<String>> {
264264

265265
if rustdoc.is_empty() {
266266
Ok(None)
267+
} else if rustdoc.len() > 51200 {
268+
Ok(Some(format!("(Library doc comment ignored due to being too long. ({} > 51200))", rustdoc.len())))
267269
} else {
268270
Ok(Some(rustdoc))
269271
}

0 commit comments

Comments
 (0)