diff options
author | Minijackson <minijackson@riseup.net> | 2020-02-23 20:14:54 +0100 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2020-02-23 20:14:54 +0100 |
commit | ee2c0b769601fcaec11477746f056c80708058db (patch) | |
tree | 9abd70dd294372bccee590db1a2446174958a035 | |
parent | 6e995d01ce1cc36f84541b43c33868f090c01ac8 (diff) | |
download | poseidoc-ee2c0b769601fcaec11477746f056c80708058db.tar.gz poseidoc-ee2c0b769601fcaec11477746f056c80708058db.zip |
clang-parser: don't put the entity in error message
-rw-r--r-- | src/parser/clang/entities.rs | 4 |
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 |