Skip to content

Commit

Permalink
Add display impl to Fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
vcfxb committed Jul 13, 2024
1 parent 8543f4a commit 74b62fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wright/src/source_tracking/fragment.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! [Fragment] struct and implementation for dealing with fragments of source code.
use super::SourceRef;
use derive_more::Display;
use std::{ops::Range, str::Chars, sync::Arc};

#[cfg(doc)]
Expand All @@ -9,7 +10,8 @@ use crate::source_tracking::source::Source;
/// A fragment of source code.
///
/// This can be part of (or all of) a [Source].
#[derive(Clone, Debug)]
#[derive(Clone, Debug, Display)]
#[display(fmt = "{}", "self.as_str()")]
pub struct Fragment {
/// The [Source] that this fragment is in.
pub source: SourceRef,
Expand Down

0 comments on commit 74b62fb

Please sign in to comment.