mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-10-23 21:52:23 +00:00
style: Remove now dead code
This commit is contained in:
2 files changed
+1
-20
No files matched your search
@@ -58,7 +58,7 @@ pub fn add_age(&mut self) -> Result {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn add_relation(&mut self, name: &str, pdu: Option<&Pdu>) -> Result {
|
||||
pub fn add_relation(&mut self, name: &str, pdu: Option<&Self>) -> Result {
|
||||
use serde_json::Map;
|
||||
|
||||
let mut unsigned: Map<String, JsonValue> = self
|
||||
|
||||
@@ -44,25 +44,6 @@ pub(crate) fn legacy_is_cargo_build() -> bool {
|
||||
|
||||
pub(crate) fn is_cargo_test() -> bool { std::env::args().any(|flag| flag == "--test") }
|
||||
|
||||
pub(crate) fn get_named_generics(args: &[Meta], name: &str) -> Result<Generics> {
|
||||
const DEFAULT: &str = "<>";
|
||||
|
||||
parse_str::<Generics>(&get_named_string(args, name).unwrap_or_else(|| DEFAULT.to_owned()))
|
||||
}
|
||||
|
||||
pub(crate) fn get_named_string(args: &[Meta], name: &str) -> Option<String> {
|
||||
args.iter().find_map(|arg| {
|
||||
let value = arg.require_name_value().ok()?;
|
||||
let Expr::Lit(ref lit) = value.value else {
|
||||
return None;
|
||||
};
|
||||
let Lit::Str(ref str) = lit.lit else {
|
||||
return None;
|
||||
};
|
||||
value.path.is_ident(name).then_some(str.value())
|
||||
})
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub(crate) fn camel_to_snake_string(s: &str) -> String {
|
||||
let mut output = String::with_capacity(
|
||||
|
||||
Reference in new issue
Block a user