From 1030c6f60fd2fae5bc92bccc9ecfde09a38b11fc Mon Sep 17 00:00:00 2001 From: Bauke Date: Sat, 9 Dec 2023 15:12:54 +0100 Subject: [PATCH] Move global lints to Cargo.toml. --- Cargo.toml | 3 +++ source/main.rs | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a3b8c04..f054802 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,3 +26,6 @@ pathfinding = "4.4.0" rand = "0.8.5" regex = "1.10.2" ureq = { version = "2.8.0", features = ["cookie", "cookie_store"] } + +[lints.rust] +unsafe_code = "forbid" diff --git a/source/main.rs b/source/main.rs index f671a5f..2118f6e 100644 --- a/source/main.rs +++ b/source/main.rs @@ -2,8 +2,6 @@ //! //! > **Advent of Code solutions in Rust.** -#![forbid(unsafe_code)] - use std::{fs::read_to_string, path::PathBuf}; use {askama::Template, clap::Parser, color_eyre::Result};