Solve the rest of the compiler warnings.

This commit is contained in:
Tom Alexander
2023-04-21 18:42:31 -04:00
parent a1724dae52
commit 18323a2b43
13 changed files with 16 additions and 31 deletions

View File

@@ -222,7 +222,7 @@ fn compare_paragraph<'s>(
rust: &'s Paragraph<'s>,
) -> Result<DiffResult, Box<dyn std::error::Error>> {
let children = emacs.as_list()?;
let mut child_status = Vec::new();
let child_status = Vec::new();
let mut this_status = DiffStatus::Good;
let emacs_name = "paragraph";
if assert_name(emacs, emacs_name).is_err() {
@@ -233,7 +233,7 @@ fn compare_paragraph<'s>(
this_status = DiffStatus::Bad;
}
for (emacs_child, rust_child) in children.iter().skip(2).zip(rust.children.iter()) {}
for (_emacs_child, _rust_child) in children.iter().skip(2).zip(rust.children.iter()) {}
Ok(DiffResult {
status: this_status,
@@ -396,8 +396,7 @@ fn compare_comment<'s>(
emacs: &'s Token<'s>,
rust: &'s Comment<'s>,
) -> Result<DiffResult, Box<dyn std::error::Error>> {
let children = emacs.as_list()?;
let mut child_status = Vec::new();
let child_status = Vec::new();
let mut this_status = DiffStatus::Good;
let emacs_name = "comment";
if assert_name(emacs, emacs_name).is_err() {
@@ -451,7 +450,7 @@ fn compare_property_drawer<'s>(
rust: &'s PropertyDrawer<'s>,
) -> Result<DiffResult, Box<dyn std::error::Error>> {
let children = emacs.as_list()?;
let mut child_status = Vec::new();
let child_status = Vec::new();
let mut this_status = DiffStatus::Good;
let emacs_name = "property-drawer";
if assert_name(emacs, emacs_name).is_err() {
@@ -462,7 +461,7 @@ fn compare_property_drawer<'s>(
this_status = DiffStatus::Bad;
}
for (emacs_child, rust_child) in children.iter().skip(2).zip(rust.children.iter()) {
for (_emacs_child, _rust_child) in children.iter().skip(2).zip(rust.children.iter()) {
// TODO: What are node properties and are they the only legal child of property drawers?
// child_status.push(compare_element(source, emacs_child, rust_child)?);
}
@@ -539,7 +538,7 @@ fn compare_table_cell<'s>(
rust: &'s TableCell<'s>,
) -> Result<DiffResult, Box<dyn std::error::Error>> {
let children = emacs.as_list()?;
let mut child_status = Vec::new();
let child_status = Vec::new();
let mut this_status = DiffStatus::Good;
let emacs_name = "table-cell";
if assert_name(emacs, emacs_name).is_err() {
@@ -550,7 +549,7 @@ fn compare_table_cell<'s>(
this_status = DiffStatus::Bad;
}
for (emacs_child, rust_child) in children.iter().skip(2).zip(rust.children.iter()) {}
for (_emacs_child, _rust_child) in children.iter().skip(2).zip(rust.children.iter()) {}
Ok(DiffResult {
status: this_status,
@@ -566,7 +565,7 @@ fn compare_verse_block<'s>(
rust: &'s VerseBlock<'s>,
) -> Result<DiffResult, Box<dyn std::error::Error>> {
let children = emacs.as_list()?;
let mut child_status = Vec::new();
let child_status = Vec::new();
let mut this_status = DiffStatus::Good;
let emacs_name = "verse-block";
if assert_name(emacs, emacs_name).is_err() {
@@ -577,7 +576,7 @@ fn compare_verse_block<'s>(
this_status = DiffStatus::Bad;
}
for (emacs_child, rust_child) in children.iter().skip(2).zip(rust.children.iter()) {}
for (_emacs_child, _rust_child) in children.iter().skip(2).zip(rust.children.iter()) {}
Ok(DiffResult {
status: this_status,

View File

@@ -1,5 +1,3 @@
use crate::error::CustomError;
use crate::error::MyError;
use crate::error::Res;
use std::collections::HashMap;