Skip to content

A fast, helpful, and open-source document parser

nit

Logan Markewich95225c406279
diff --git a/crates/liteparse-python/src/lib.rs b/crates/liteparse-python/src/lib.rs
index b3a5774..43dd255 100644
--- a/crates/liteparse-python/src/lib.rs
+++ b/crates/liteparse-python/src/lib.rs
@@ -56,7 +56,7 @@ impl PyTextItem {
}
}
- fn from_rust(item: liteparse::types::TextItem) -> Self {
+ fn from_rust(item: &liteparse::types::TextItem) -> Self {
Self {
text: item.text.clone(),
x: item.x as f64,
@@ -371,7 +371,7 @@ fn search_items(items: Vec<PyTextItem>, phrase: String, case_sensitive: bool) ->
case_sensitive,
};
liteparse::search::search_items(&rust_items, &options)
- .into_iter()
+ .iter()
.map(PyTextItem::from_rust)
.collect()
}