Skip to content

Commit 3bc6068

Browse files
committed
Show message that doc comment is too long instead of failing
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
1 parent 32102ce commit 3bc6068

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)