Add a unit test for preserving disk-based diagnostics
This commit is contained in:
parent
1544da887e
commit
0faf5308ac
3 changed files with 110 additions and 3 deletions
|
@ -2057,12 +2057,18 @@ pub trait FromAnchor {
|
|||
|
||||
impl FromAnchor for Point {
|
||||
fn from_anchor(anchor: &Anchor, snapshot: &BufferSnapshot) -> Self {
|
||||
anchor.to_point(snapshot)
|
||||
snapshot.summary_for_anchor(anchor)
|
||||
}
|
||||
}
|
||||
|
||||
impl FromAnchor for PointUtf16 {
|
||||
fn from_anchor(anchor: &Anchor, snapshot: &BufferSnapshot) -> Self {
|
||||
snapshot.summary_for_anchor(anchor)
|
||||
}
|
||||
}
|
||||
|
||||
impl FromAnchor for usize {
|
||||
fn from_anchor(anchor: &Anchor, snapshot: &BufferSnapshot) -> Self {
|
||||
anchor.to_offset(snapshot)
|
||||
snapshot.summary_for_anchor(anchor)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue