mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-07-05 03:55:02 +00:00
Run cargo fmt
on codebase
This commit is contained in:
parent
15feff3e79
commit
0af3956abd
28 changed files with 347 additions and 202 deletions
|
@ -878,9 +878,7 @@ fn js_escape_helper<'reg, 'rc>(
|
|||
.param(0)
|
||||
.ok_or_else(|| RenderError::new("Param not found for helper \"js_escape\""))?;
|
||||
|
||||
let no_quote = h
|
||||
.param(1)
|
||||
.is_some();
|
||||
let no_quote = h.param(1).is_some();
|
||||
|
||||
let value = param
|
||||
.value()
|
||||
|
@ -888,7 +886,7 @@ fn js_escape_helper<'reg, 'rc>(
|
|||
.ok_or_else(|| RenderError::new("Param for helper \"js_escape\" is not a String"))?;
|
||||
|
||||
let mut escaped_value = value.replace('\\', "").replace('\'', "\\x22").replace('\"', "\\x27");
|
||||
if ! no_quote {
|
||||
if !no_quote {
|
||||
escaped_value = format!(""{}"", escaped_value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue