more warnings cleared

This commit is contained in:
Priec
2025-08-19 01:04:40 +02:00
parent 5ae8d13719
commit 8ed2fbbe34

View File

@@ -5,20 +5,12 @@ use super::engine::SyntectEngine;
use crate::textarea::state::TextAreaState; use crate::textarea::state::TextAreaState;
// Remove Debug derive since TextAreaState doesn't implement Debug // Remove Debug derive since TextAreaState doesn't implement Debug
#[derive(Default)]
pub struct TextAreaSyntaxState { pub struct TextAreaSyntaxState {
pub textarea: TextAreaState, pub textarea: TextAreaState,
pub engine: SyntectEngine, pub engine: SyntectEngine,
} }
impl Default for TextAreaSyntaxState {
fn default() -> Self {
Self {
textarea: TextAreaState::default(),
engine: SyntectEngine::new(),
}
}
}
impl TextAreaSyntaxState { impl TextAreaSyntaxState {
pub fn from_text<S: Into<String>>(text: S) -> Self { pub fn from_text<S: Into<String>>(text: S) -> Self {
let mut s = Self::default(); let mut s = Self::default();