Move assert bounds for elements and objects (except PlainText) to the compare element/object functions.
This commit is contained in:
@@ -13,7 +13,7 @@ fn is_slice_of(parent: &str, child: &str) -> bool {
|
||||
/// Get the byte offset into source that the rust object exists at.
|
||||
///
|
||||
/// These offsets are zero-based unlike the elisp ones.
|
||||
fn get_rust_byte_offsets<'s, S: StandardProperties<'s>>(
|
||||
fn get_rust_byte_offsets<'s, S: StandardProperties<'s> + ?Sized>(
|
||||
original_document: &'s str,
|
||||
rust_ast_node: &'s S,
|
||||
) -> (usize, usize) {
|
||||
@@ -46,7 +46,7 @@ pub(crate) fn assert_name<'s>(
|
||||
/// Assert that the character ranges defined by upstream org-mode's :standard-properties match the slices in Organic's StandardProperties.
|
||||
///
|
||||
/// This does **not** handle plain text because plain text is a special case.
|
||||
pub(crate) fn assert_bounds<'s, S: StandardProperties<'s>>(
|
||||
pub(crate) fn assert_bounds<'s, S: StandardProperties<'s> + ?Sized>(
|
||||
original_document: &'s str,
|
||||
emacs: &'s Token<'s>,
|
||||
rust: &'s S,
|
||||
|
||||
Reference in New Issue
Block a user