More lints
This commit is contained in:
parent
1e1dd7b877
commit
2d5c91a5ef
7 changed files with 27 additions and 20 deletions
|
|
@ -7,7 +7,8 @@ pub use operation::Operation;
|
|||
|
||||
use crate::tokenizer::Tokenizer;
|
||||
|
||||
#[must_use] pub fn reconcile(original: &str, left: &str, right: &str) -> String {
|
||||
#[must_use]
|
||||
pub fn reconcile(original: &str, left: &str, right: &str) -> String {
|
||||
if left == right {
|
||||
return left.to_owned();
|
||||
}
|
||||
|
|
@ -188,7 +189,7 @@ mod test {
|
|||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
reconcile(&contents[0], &contents[1], &contents[2]);
|
||||
let _ = reconcile(&contents[0], &contents[1], &contents[2]);
|
||||
}
|
||||
|
||||
fn test_merge_both_ways(original: &str, edit_1: &str, edit_2: &str, expected: &str) {
|
||||
|
|
|
|||
|
|
@ -110,8 +110,7 @@ where
|
|||
#[cfg(debug_assertions)]
|
||||
debug_assert!(
|
||||
deleted_text
|
||||
.as_ref()
|
||||
.map_or(true, |text| builder.get_slice(self.range()) == *text),
|
||||
.as_ref().is_none_or(|text| builder.get_slice(self.range()) == *text),
|
||||
"Text to delete does not match the text in the rope"
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue