diff options
| author | Sébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com> | 2023-04-23 14:33:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-23 14:33:56 +0200 |
| commit | 561ff979d574f496415c0499345d41da2e1f6e1e (patch) | |
| tree | 037479ac000bd87a1cb2149e5389b28f08d24051 /library/src/text | |
| parent | 2fbb14f712708188649181525813b3ac5a02e0fb (diff) | |
Add instrumentation (Part 1) (#761)
Diffstat (limited to 'library/src/text')
| -rw-r--r-- | library/src/text/deco.rs | 3 | ||||
| -rw-r--r-- | library/src/text/misc.rs | 2 | ||||
| -rw-r--r-- | library/src/text/raw.rs | 1 | ||||
| -rw-r--r-- | library/src/text/shift.rs | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/library/src/text/deco.rs b/library/src/text/deco.rs index 7b90b22f..49bd3971 100644 --- a/library/src/text/deco.rs +++ b/library/src/text/deco.rs @@ -66,6 +66,7 @@ pub struct UnderlineElem { } impl Show for UnderlineElem { + #[tracing::instrument(name = "UnderlineElem::show", skip_all)] fn show(&self, _: &mut Vt, styles: StyleChain) -> SourceResult<Content> { Ok(self.body().styled(TextElem::set_deco(Decoration { line: DecoLine::Underline, @@ -145,6 +146,7 @@ pub struct OverlineElem { } impl Show for OverlineElem { + #[tracing::instrument(name = "OverlineElem::show", skip_all)] fn show(&self, _: &mut Vt, styles: StyleChain) -> SourceResult<Content> { Ok(self.body().styled(TextElem::set_deco(Decoration { line: DecoLine::Overline, @@ -209,6 +211,7 @@ pub struct StrikeElem { } impl Show for StrikeElem { + #[tracing::instrument(name = "StrikeElem::show", skip_all)] fn show(&self, _: &mut Vt, styles: StyleChain) -> SourceResult<Content> { Ok(self.body().styled(TextElem::set_deco(Decoration { line: DecoLine::Strikethrough, diff --git a/library/src/text/misc.rs b/library/src/text/misc.rs index a707d130..fa3a99fa 100644 --- a/library/src/text/misc.rs +++ b/library/src/text/misc.rs @@ -105,6 +105,7 @@ pub struct StrongElem { } impl Show for StrongElem { + #[tracing::instrument(name = "StrongElem::show", skip_all)] fn show(&self, _: &mut Vt, styles: StyleChain) -> SourceResult<Content> { Ok(self.body().styled(TextElem::set_delta(Delta(self.delta(styles))))) } @@ -165,6 +166,7 @@ pub struct EmphElem { } impl Show for EmphElem { + #[tracing::instrument(name = "EmphElem::show", skip(self))] fn show(&self, _: &mut Vt, _: StyleChain) -> SourceResult<Content> { Ok(self.body().styled(TextElem::set_emph(Toggle))) } diff --git a/library/src/text/raw.rs b/library/src/text/raw.rs index 6d90bc5b..6cd1fc12 100644 --- a/library/src/text/raw.rs +++ b/library/src/text/raw.rs @@ -129,6 +129,7 @@ impl Synthesize for RawElem { } impl Show for RawElem { + #[tracing::instrument(name = "RawElem::show", skip_all)] fn show(&self, _: &mut Vt, styles: StyleChain) -> SourceResult<Content> { let text = self.text(); let lang = self.lang(styles).as_ref().map(|s| s.to_lowercase()); diff --git a/library/src/text/shift.rs b/library/src/text/shift.rs index 26978b87..4eac5897 100644 --- a/library/src/text/shift.rs +++ b/library/src/text/shift.rs @@ -45,6 +45,7 @@ pub struct SubElem { } impl Show for SubElem { + #[tracing::instrument(name = "SubElem::show", skip_all)] fn show(&self, vt: &mut Vt, styles: StyleChain) -> SourceResult<Content> { let body = self.body(); let mut transformed = None; @@ -107,6 +108,7 @@ pub struct SuperElem { } impl Show for SuperElem { + #[tracing::instrument(name = "SuperElem::show", skip_all)] fn show(&self, vt: &mut Vt, styles: StyleChain) -> SourceResult<Content> { let body = self.body(); let mut transformed = None; |
