Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Fix new clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
aringenbach committed Jul 20, 2023
1 parent 6a69dfa commit b37537e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
6 changes: 0 additions & 6 deletions crates/wysiwyg/src/dom/dom_creation_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ pub struct HtmlParseError {
}

impl HtmlParseError {
pub fn default() -> Self {
Self {
parse_errors: vec![],
}
}

pub fn new(parse_errors: Vec<String>) -> Self {
Self { parse_errors }
}
Expand Down
3 changes: 1 addition & 2 deletions crates/wysiwyg/src/dom/dom_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ where

// We repeatedly delete to ensure anything that became empty because
// of deletions is itself deleted.
while !to_delete.is_empty() {
let handle = to_delete.pop().unwrap();
while let Some(handle) = to_delete.pop() {
if handle.is_root() {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion crates/wysiwyg/src/dom/insert_parent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ impl<S> Dom<S>
where
S: UnicodeString,
{
#[allow(dead_code)]
#[allow(dead_code, clippy::let_and_return)]
/// Insert a node and make this node the parent of a given range.
pub fn insert_parent(
&mut self,
Expand Down
2 changes: 1 addition & 1 deletion crates/wysiwyg/src/dom/parser/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ fn convert_text<S: UnicodeString>(
return;
}

for (i, part) in contents.split("@room").into_iter().enumerate() {
for (i, part) in contents.split("@room").enumerate() {
if i > 0 {
node.append_child(DomNode::Mention(
DomNode::new_at_room_mention(vec![]),
Expand Down

0 comments on commit b37537e

Please sign in to comment.