Skip to content

Commit

Permalink
fix warnings and clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
sftse committed Sep 12, 2024
1 parent 3c6b04c commit 6f4ac52
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
5 changes: 0 additions & 5 deletions examples/html2term.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
#[cfg(unix)]
extern crate argparse;
#[cfg(unix)]
extern crate termion;
#[cfg(unix)]
extern crate unicode_width;
#[cfg(unix)]
mod top {
use ::html2text;
use ::std;
use ::termion;
use argparse::{ArgumentParser, Store};
use html2text::render::{RichAnnotation, TaggedLine, TaggedLineElement};
use std::collections::HashMap;
Expand Down
2 changes: 1 addition & 1 deletion src/css/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ fn ident_escape(s: &str) -> IResult<&str, char> {
match chars.next() {
None => {
// EOF: return replacement char
Ok((&rest, '\u{fffd}'))
Ok((rest, '\u{fffd}'))
}
Some((i, c)) if c.is_hex_digit() => {
// Option 1: up to 6 hex digits.
Expand Down
1 change: 0 additions & 1 deletion src/markup5ever_rcdom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ extern crate tendril;
use std::borrow::Cow;
use std::cell::{Cell, RefCell};
use std::collections::{HashSet, VecDeque};
use std::default::Default;
use std::fmt;
use std::io;
use std::mem;
Expand Down
2 changes: 1 addition & 1 deletion src/render/text_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ impl<D: TextDecorator> SubRenderer<D> {
let mut result = String::new();
for line in &self.lines {
result += &line.to_string();
result.push_str("\n");
result.push('\n');
}
result
}
Expand Down
4 changes: 2 additions & 2 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1128,14 +1128,14 @@ hi
.take(rpt - 3)
.collect::<Vec<_>>()
.concat()
+ &r#"──┬────
+ r#"──┬────
hi│hi
│////
│──
│hi
│──
──┴────
"# + &repeat("──────────\n").take(rpt - 3).collect::<String>();
"# + &"──────────\n".repeat(rpt - 3);
test_html(html.as_bytes(), &result, 10);
}

Expand Down

0 comments on commit 6f4ac52

Please sign in to comment.