Skip to content

Commit

Permalink
Fix last clippy issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuereth committed Nov 27, 2024
1 parent 83b9d0a commit e707f75
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions crates/weaver_forge/src/extensions/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ pub fn acronym(acronyms: Vec<String>) -> impl Fn(&str) -> String {

#[cfg(test)]
mod tests {
use crate::extensions::util::add_filters;
use crate::{config::WeaverConfig, extensions::util::add_filters};
use minijinja::Environment;

#[test]
fn test_regex_replace() {
let mut env = Environment::new();
let ctx = serde_json::Value::Null;
let config = crate::config::WeaverConfig::default();
let config = WeaverConfig::default();

add_filters(&mut env, &config);

Expand All @@ -164,8 +164,11 @@ mod tests {
fn test_acronym_filter() {
let mut env = Environment::new();
let ctx = serde_json::Value::Null;
let mut config = crate::config::WeaverConfig::default();
config.acronyms = Some(vec!["Html".to_owned(), "iOS".to_owned(), "API".to_owned()]);
let config =
WeaverConfig {
acronyms: Some(vec!["Html".to_owned(), "iOS".to_owned(), "API".to_owned()]),
..Default::default()
};
add_filters(&mut env, &config);
assert_eq!(
env.render_str("{{ 'api' | acronym }}", &ctx).unwrap(),
Expand Down

0 comments on commit e707f75

Please sign in to comment.