fixup
This commit is contained in:
@@ -19,13 +19,8 @@ fn generate_hashmap() {
|
||||
let path = Path::new(&env::var("OUT_DIR").unwrap()).join("codegen.rs");
|
||||
let mut file = BufWriter::new(File::create(&path).expect("Could not create file"));
|
||||
|
||||
let string_hashmap = compile_hashmap(
|
||||
SUPPORTED_FUNCTIONS
|
||||
.to_vec()
|
||||
.iter()
|
||||
.map(|a| a.to_string())
|
||||
.collect(),
|
||||
);
|
||||
let string_hashmap =
|
||||
compile_hashmap(SUPPORTED_FUNCTIONS.iter().map(|a| a.to_string()).collect());
|
||||
|
||||
let mut hashmap = phf_codegen::Map::new();
|
||||
|
||||
|
||||
@@ -258,21 +258,19 @@ impl<'a> Hint<'a> {
|
||||
|
||||
#[inline]
|
||||
#[allow(dead_code)]
|
||||
pub const fn single(&self) -> Option<&&str> {
|
||||
if let Hint::Single(data) = self {
|
||||
Some(data)
|
||||
} else {
|
||||
None
|
||||
pub const fn single(&self) -> Option<&str> {
|
||||
match self {
|
||||
Hint::Single(data) => Some(data),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[allow(dead_code)]
|
||||
pub const fn many(&self) -> Option<&&[&str]> {
|
||||
if let Hint::Many(data) = self {
|
||||
Some(data)
|
||||
} else {
|
||||
None
|
||||
pub const fn many(&self) -> Option<&[&str]> {
|
||||
match self {
|
||||
Hint::Many(data) => Some(data),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user