mirror of
https://github.com/widberg/bff
synced 2026-08-23 14:26:03 -04:00
Remove unused functions
This commit is contained in:
parent
46e8fc2175
commit
c9fa981ede
12 changed files with 50 additions and 86 deletions
|
|
@ -17,13 +17,21 @@ fn collect_cps_names(cps: &Cps, name_context: &mut NameContext) -> HashSet<Name>
|
|||
|
||||
for (path, script) in &cps.tscs {
|
||||
if let Some(stem) = path.file_stem().and_then(|stem| stem.to_str()) {
|
||||
names.insert(name_context.parse_i32_or_hash_name(stem));
|
||||
let name = name_context
|
||||
.name_type()
|
||||
.parse_name_value(stem)
|
||||
.unwrap_or_else(|| name_context.insert(stem));
|
||||
names.insert(name);
|
||||
}
|
||||
for line in script.lines() {
|
||||
if let Some(command_name) = line.split_whitespace().next()
|
||||
&& !command_name.is_empty()
|
||||
{
|
||||
names.insert(name_context.parse_i32_or_hash_name(command_name));
|
||||
let name = name_context
|
||||
.name_type()
|
||||
.parse_name_value(command_name)
|
||||
.unwrap_or_else(|| name_context.insert(command_name));
|
||||
names.insert(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
use std::collections::VecDeque;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use bff::names::{NameContext, NameType, WORDLIST_ANIMALS, WORDLIST_BIP39, get_forced_hash_string};
|
||||
use bff::names::{
|
||||
NameContext,
|
||||
NameType,
|
||||
WORDLIST_ANIMALS,
|
||||
WORDLIST_BIP39,
|
||||
get_forced_hash_string_for_type,
|
||||
};
|
||||
use bff::petgraph;
|
||||
use bff::petgraph::visit::{VisitMap, Visitable};
|
||||
use clap::ValueEnum;
|
||||
|
|
@ -112,7 +118,11 @@ pub fn names(
|
|||
} else {
|
||||
format!("{}{}", string, class)
|
||||
};
|
||||
name_context.insert(&get_forced_hash_string(name, name_string));
|
||||
name_context.insert(&get_forced_hash_string_for_type(
|
||||
name_context.name_type(),
|
||||
name,
|
||||
name_string,
|
||||
));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -125,7 +135,8 @@ pub fn names(
|
|||
Wordlist::Animals => name.get_wordlist_encoded_string(WORDLIST_ANIMALS),
|
||||
Wordlist::BIP39 => name.get_wordlist_encoded_string(WORDLIST_BIP39),
|
||||
};
|
||||
name_context.insert(&get_forced_hash_string(
|
||||
name_context.insert(&get_forced_hash_string_for_type(
|
||||
name_context.name_type(),
|
||||
name,
|
||||
format!("{}.{}", string, class),
|
||||
));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue