From e92b073eb06de4c49a9d40d3c28860c73846df1e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 24 Aug 2021 19:16:29 -0500 Subject: [PATCH] docs: Fix typos --- crates/core/src/partials/inmemory.rs | 2 +- crates/lib/src/stdlib/filters/mod.rs | 2 +- crates/lib/src/stdlib/filters/slice.rs | 6 +++--- tests/conformance_ruby/parse_tree_visitor_test.rs | 2 +- tests/derive_macros_test_filters/mixed.rs | 2 +- typos.toml | 2 ++ 6 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 typos.toml diff --git a/crates/core/src/partials/inmemory.rs b/crates/core/src/partials/inmemory.rs index 907ec4081..fc32c4669 100644 --- a/crates/core/src/partials/inmemory.rs +++ b/crates/core/src/partials/inmemory.rs @@ -15,7 +15,7 @@ impl InMemorySource { Default::default() } - /// Add a partial-template's souce. + /// Add a partial-template's source. pub fn add(&mut self, name: N, source: S) -> bool where N: Into, diff --git a/crates/lib/src/stdlib/filters/mod.rs b/crates/lib/src/stdlib/filters/mod.rs index 13f67884c..33947dc5a 100644 --- a/crates/lib/src/stdlib/filters/mod.rs +++ b/crates/lib/src/stdlib/filters/mod.rs @@ -33,7 +33,7 @@ pub use self::url::{UrlDecode, UrlEncode}; #[derive(Clone, ParseFilter, FilterReflection)] #[filter( name = "size", - description = "Returns the size of the input. For an array or object this is the number of elemets. For other values it's the length of its string representation.", + description = "Returns the size of the input. For an array or object this is the number of elements. For other values it's the length of its string representation.", parsed(SizeFilter) )] pub struct Size; diff --git a/crates/lib/src/stdlib/filters/slice.rs b/crates/lib/src/stdlib/filters/slice.rs index 9df0dd2a2..94c8edb0e 100644 --- a/crates/lib/src/stdlib/filters/slice.rs +++ b/crates/lib/src/stdlib/filters/slice.rs @@ -101,11 +101,11 @@ mod tests { liquid_core::call_filter!( Slice, "I often quote myself. It adds spice to my conversation.", - 10, - 2 + 2, + 3 ) .unwrap(), - liquid_core::value!("ot") + liquid_core::value!("oft") ); } diff --git a/tests/conformance_ruby/parse_tree_visitor_test.rs b/tests/conformance_ruby/parse_tree_visitor_test.rs index f2ee110a9..daad990a9 100644 --- a/tests/conformance_ruby/parse_tree_visitor_test.rs +++ b/tests/conformance_ruby/parse_tree_visitor_test.rs @@ -6,7 +6,7 @@ fn test_variable() { #[test] #[should_panic] -fn test_varible_with_filter() { +fn test_variable_with_filter() { panic!("Implementation specific: parsing API"); } diff --git a/tests/derive_macros_test_filters/mixed.rs b/tests/derive_macros_test_filters/mixed.rs index 0c01a07c2..09fc3c0fc 100644 --- a/tests/derive_macros_test_filters/mixed.rs +++ b/tests/derive_macros_test_filters/mixed.rs @@ -6,7 +6,7 @@ use liquid_core::{ }; use liquid_core::{Value, ValueView}; -// Colision with FilterParameters' evaluated struct. +// Collision with FilterParameters' evaluated struct. #[allow(dead_code)] struct EvaluatedTestMixedFilterParameters; diff --git a/typos.toml b/typos.toml new file mode 100644 index 000000000..7ef70946c --- /dev/null +++ b/typos.toml @@ -0,0 +1,2 @@ +[default.extend-words] +ser = "ser"