use const over static

master
Edward Shen 2019-12-23 22:21:42 -05:00
parent b09f1b96ea
commit f70154e819
Signed by: edward
GPG Key ID: F350507060ED6C90
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ use std::time::Duration;
mod routes;
mod template_args;
static DEFAULT_CONFIG: &[u8] = include_bytes!("../bunbun.default.toml");
const DEFAULT_CONFIG: &[u8] = include_bytes!("../bunbun.default.toml");
#[derive(Debug)]
#[allow(clippy::enum_variant_names)]

View File

@ -12,7 +12,7 @@ use std::collections::HashMap;
use std::sync::{Arc, RwLock};
/// https://url.spec.whatwg.org/#fragment-percent-encode-set
static FRAGMENT_ENCODE_SET: &AsciiSet = &CONTROLS
const FRAGMENT_ENCODE_SET: &AsciiSet = &CONTROLS
.add(b' ')
.add(b'"')
.add(b'<')