mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-06-10 05:57:48 +00:00
take references rather than owned value for render_search
This commit is contained in:
parent
4fc0fd615a
commit
8a02b84f9b
@ -107,7 +107,7 @@ impl JsonTemplate {
|
||||
/// # Error
|
||||
///
|
||||
/// - If any of the strings contains a template that cannot be rendered from the contents of the search query
|
||||
pub fn render_search(&self, q: Option<String>, media: Value) -> Result<Value, Error> {
|
||||
pub fn render_search(&self, q: Option<&str>, media: &Value) -> Result<Value, Error> {
|
||||
let search_data = liquid::object!({
|
||||
"q": q,
|
||||
"media": media
|
||||
|
Loading…
x
Reference in New Issue
Block a user