summaryrefslogtreecommitdiff
path: root/crates/typst-library/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-11-19 17:42:43 +0100
committerLaurenz <laurmaedje@gmail.com>2023-11-19 18:16:18 +0100
commitc97a01616abd3af6511ceac28a01ac6d3023ae83 (patch)
treeef3b11b776d88131f1b855d9a3dfefc1b210e2a3 /crates/typst-library/src
parent2da619e17cb48efd468818ea35793b3f90b8aaea (diff)
More useful `Debug` impls
Diffstat (limited to 'crates/typst-library/src')
-rw-r--r--crates/typst-library/src/meta/bibliography.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/typst-library/src/meta/bibliography.rs b/crates/typst-library/src/meta/bibliography.rs
index c258d19d..b84c330a 100644
--- a/crates/typst-library/src/meta/bibliography.rs
+++ b/crates/typst-library/src/meta/bibliography.rs
@@ -1,5 +1,6 @@
use std::collections::HashMap;
use std::ffi::OsStr;
+use std::fmt::{self, Debug, Formatter};
use std::hash::{Hash, Hasher};
use std::path::Path;
use std::sync::Arc;
@@ -296,7 +297,7 @@ impl LocalName for BibliographyElem {
/// A loaded bibliography.
#[ty]
-#[derive(Debug, Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
pub struct Bibliography {
map: Arc<IndexMap<PicoStr, hayagriva::Entry>>,
hash: u128,
@@ -378,6 +379,12 @@ impl Bibliography {
}
}
+impl Debug for Bibliography {
+ fn fmt(&self, f: &mut Formatter) -> fmt::Result {
+ f.debug_set().entries(self.map.keys()).finish()
+ }
+}
+
impl Hash for Bibliography {
fn hash<H: Hasher>(&self, state: &mut H) {
self.hash.hash(state);