@@ -46,9 +46,9 @@ fn default_formatter() -> Arc<FormatterFunc> {
4646}
4747
4848/// The maximum recursion in the VM. Normally each stack frame
49- /// adds one to this counter (eg: every time a frame is added).
49+ /// adds one to this counter (e.g., every time a frame is added).
5050/// However in some situations more depth is pushed if the cost
51- /// of the stack frame is higher. Raising this above this limit
51+ /// of the stack frame is higher. Raising this limit
5252/// requires enabling the `stacker` feature.
5353const MAX_RECURSION : usize = 500 ;
5454
@@ -192,8 +192,9 @@ impl<'source> Environment<'source> {
192192 /// env.add_template_owned("index.html".to_string(), "Hello {{ name }}!".to_string()).unwrap();
193193 /// ```
194194 ///
195- /// **Note**: the name is a bit of a misnomer as this API also allows to borrow too as
196- /// the parameters are actually [`Cow`]. This method fails if the template has a syntax error.
195+ /// **Note**: the name is a bit of a misnomer as this API also allows borrowing,
196+ /// as the parameters are actually [`Cow`]. This method fails if the template
197+ /// has a syntax error.
197198 pub fn add_template_owned < N , S > ( & mut self , name : N , source : S ) -> Result < ( ) , Error >
198199 where
199200 N : Into < Cow < ' source , str > > ,
@@ -407,8 +408,7 @@ impl<'source> Environment<'source> {
407408
408409 /// Loads a template from a string.
409410 ///
410- /// In some cases you really only need to work with (eg: render) a template to be
411- /// rendered once only.
411+ /// In some cases you only need to work with (e.g., render) a template once.
412412 ///
413413 /// ```
414414 /// # use minijinja::{Environment, context};
@@ -492,7 +492,7 @@ impl<'source> Environment<'source> {
492492 /// invoked with the name of the template and can make an initial auto
493493 /// escaping decision based on that. The default implementation
494494 /// ([`default_auto_escape_callback`](defaults::default_auto_escape_callback))
495- /// turn on escaping depending on the file extension.
495+ /// turns on escaping depending on the file extension.
496496 ///
497497 /// ```
498498 /// # use minijinja::{Environment, AutoEscape};
@@ -675,9 +675,9 @@ impl<'source> Environment<'source> {
675675
676676 /// Compiles an expression.
677677 ///
678- /// This lets one compile an expression in the template language and
679- /// receive the output. This lets one use the expressions of the language
680- /// be used as a minimal scripting language. For more information and an
678+ /// This lets you compile an expression in the template language and evaluate it.
679+ /// This makes it possible to use the language's expressions as a minimal
680+ /// scripting language. For more information and an
681681 /// example see [`Expression`].
682682 pub fn compile_expression ( & self , expr : & ' source str ) -> Result < Expression < ' _ , ' source > , Error > {
683683 self . _compile_expression ( expr)
0 commit comments