Switch to a numeric post-blank.
Turns out post-blank has different meanings to different object types so we need to return a number to properly do the compare.
This commit is contained in:
@@ -128,11 +128,11 @@ fn assert_post_blank<'b, 's, S: StandardProperties<'s> + ?Sized>(
|
||||
rust: &'b S,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let standard_properties = get_emacs_standard_properties(emacs)?; // 1-based
|
||||
let rust_post_blank = rust.get_post_blank().chars().count();
|
||||
let rust_post_blank = rust.get_post_blank();
|
||||
let emacs_post_blank = standard_properties
|
||||
.post_blank
|
||||
.ok_or("Token should have a post-blank.")?;
|
||||
if rust_post_blank != emacs_post_blank {
|
||||
if rust_post_blank as usize != emacs_post_blank {
|
||||
Err(format!("Rust post-blank (in chars) {rust_post_blank} does not match emacs post-blank ({emacs_post_blank})", rust_post_blank = rust_post_blank, emacs_post_blank = emacs_post_blank))?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user