misc: Forbid non-ascii identifiers

That prevents a class of unicode attacks, e.g. invisible characters.
This commit is contained in:
Valentin Tolmer 2021-11-10 10:53:37 +01:00 committed by nitnelave
parent fa0105fa96
commit 77ced7ea43
3 changed files with 3 additions and 0 deletions

View File

@ -1,4 +1,5 @@
#![recursion_limit = "256"] #![recursion_limit = "256"]
#![forbid(non_ascii_idents)]
#![allow(clippy::nonstandard_macro_braces)] #![allow(clippy::nonstandard_macro_braces)]
pub mod components; pub mod components;
pub mod infra; pub mod infra;

View File

@ -1,3 +1,4 @@
#![forbid(non_ascii_idents)]
#![allow(clippy::nonstandard_macro_braces)] #![allow(clippy::nonstandard_macro_braces)]
use chrono::prelude::*; use chrono::prelude::*;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View File

@ -1,4 +1,5 @@
#![forbid(unsafe_code)] #![forbid(unsafe_code)]
#![forbid(non_ascii_idents)]
#![allow(clippy::nonstandard_macro_braces)] #![allow(clippy::nonstandard_macro_braces)]
use crate::{ use crate::{