Use &str instead of &String

This commit is contained in:
Alex Kotov 2020-10-18 12:23:08 +05:00
parent 3196c278c0
commit 1500b7c890
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 2 additions and 2 deletions

View File

@ -24,10 +24,10 @@ impl Fairing {
}
impl CsrfToken {
pub fn verify(&self, form_authenticity_token: &String)
pub fn verify(&self, form_authenticity_token: &str)
-> Result<(), VerificationFailure>
{
if self.0 == *form_authenticity_token {
if self.0 == form_authenticity_token {
Ok(())
}
else {