Add lints

This commit is contained in:
Andras Schmelczer 2024-12-20 11:08:14 +00:00
parent 70ec88b824
commit ec9845577a
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
5 changed files with 38 additions and 4 deletions

View file

@ -363,7 +363,7 @@ mod tests {
#[test]
fn test_apply_delete_with_create() {
let builder = StringBuilder::new("hello world");
let operation = Operation::<()>::create_delete_with_text(5, " world".to_string()).unwrap();
let operation = Operation::<()>::create_delete_with_text(5, " world".to_owned()).unwrap();
assert_eq!(operation.apply(builder).build(), "hello");
}

View file

@ -11,7 +11,7 @@ pub struct StringBuilder<'a> {
}
impl StringBuilder<'_> {
pub fn new(original: &str) -> StringBuilder {
pub fn new(original: &str) -> StringBuilder<'_> {
StringBuilder {
original,
last_old_char_index: 0,