summaryrefslogtreecommitdiffstats
path: root/src/parser/clang/entities.rs
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2020-02-23 20:14:54 +0100
committerMinijackson <minijackson@riseup.net>2020-02-23 20:14:54 +0100
commitee2c0b769601fcaec11477746f056c80708058db (patch)
tree9abd70dd294372bccee590db1a2446174958a035 /src/parser/clang/entities.rs
parent6e995d01ce1cc36f84541b43c33868f090c01ac8 (diff)
downloadposeidoc-ee2c0b769601fcaec11477746f056c80708058db.tar.gz
poseidoc-ee2c0b769601fcaec11477746f056c80708058db.zip
clang-parser: don't put the entity in error message
Diffstat (limited to 'src/parser/clang/entities.rs')
-rw-r--r--src/parser/clang/entities.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser/clang/entities.rs b/src/parser/clang/entities.rs
index c0c5490..54570d1 100644
--- a/src/parser/clang/entities.rs
+++ b/src/parser/clang/entities.rs
@@ -63,7 +63,8 @@ impl<'a> TryFrom<clang::Entity<'a>> for Description {
63 fn try_from(entity: clang::Entity) -> Result<Self> { 63 fn try_from(entity: clang::Entity) -> Result<Self> {
64 let name = entity 64 let name = entity
65 .get_display_name() 65 .get_display_name()
66 .ok_or_else(|| anyhow!("Entity has no name: {:?}", entity))?; 66 // TODO: Properly define an error
67 .ok_or_else(|| anyhow!("Entity has no name"))?;
67 68
68 // TODO: is that the best? 69 // TODO: is that the best?
69 if let (Some(brief), Some(comment)) = (entity.get_comment_brief(), entity.get_comment()) { 70 if let (Some(brief), Some(comment)) = (entity.get_comment_brief(), entity.get_comment()) {
@@ -431,7 +432,6 @@ impl TopLevel {
431 None => unreachable!(), 432 None => unreachable!(),
432 } 433 }
433 } 434 }
434
435} 435}
436 436
437// TODO: all of the DynEntity business can probably be macro generated too 437// TODO: all of the DynEntity business can probably be macro generated too