Skip to content

Commit

Permalink
fix: add #[non_exhaustive] to SoureCode enum
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Feb 17, 2023
1 parent 6751263 commit 1bde15b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions symbolic-debuginfo/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ impl fmt::Debug for Function<'_> {
pub type DynIterator<'a, T> = Box<dyn Iterator<Item = T> + 'a>;

/// Represents a source file referenced by a debug information object file.
#[non_exhaustive]
#[derive(Debug, Clone)]
pub enum SourceCode<'a> {
/// Verbatim source code/file contents.
Expand Down
3 changes: 2 additions & 1 deletion symbolic-debuginfo/tests/test_objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ fn test_ppdb_source_by_path() -> Result<(), Error> {
.unwrap();
match source.unwrap() {
SourceCode::Content(text) => assert_eq!(text.len(), 204),
SourceCode::Url(_) => panic!(),
_ => panic!(),
}
}

Expand Down Expand Up @@ -816,6 +816,7 @@ fn test_ppdb_source_links() -> Result<(), Error> {
.replace('\\', "/");
assert_eq!(url, expected);
}
_ => panic!(),
}
}

Expand Down

0 comments on commit 1bde15b

Please sign in to comment.